This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Make CSE path following use the CFG
> It's just a function call, you know.
Yes, but absolutely useless, i.e. with no algorithmic function whatsoever.
Moreover this makes the code more complex. Note that I already spotted it.
> I had a longer comment and I was asked to remove that.
+ The old CSE path following code would use MAX(2*nsets,500)
+ but now that we know exactly how many insns (and hence sets)
+ we will see in the path, it seemed like a good idea to just
+ use max_qty = 2 * nsets. Interestingly, we end up writing
+ past the end of qty_table with that value for max_qty. In
+ other words, this was a latent bug in cse.c present since
+ at least 1992.
+ Oh well, we just take a bigger max_qty now to play safe. */
This didn't explain the heuristics either. Where does
max_qty = ebb_data.nsets * MAX_RECOG_OPERANDS;
> Yikes! I even tested Ada with a previous version of the patch.
> My guess is that it's another behind-the-back change of a may-trap
> insn into a non-trapping insn. You can use the debug counter to find
> out at which cse_main invocation the problem appears, and then go
> through the changes to all BB_END insns (or move the counter inside
OK, thanks for the tip.