[PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074, take 2)

Jakub Jelinek jakub@redhat.com
Sun Dec 4 21:14:00 GMT 2011


On Sun, Dec 04, 2011 at 09:53:42PM +0100, Eric Botcazou wrote:
> > What about this way?  I've groupped the two variables into a structure
> > to make it clear it is internal internal_arg_pointer_based_exp* state,
> > scanning is done in a separate function and the SCAN argument is gone,
> > instead the internal_arg_pointer_based_exp_scan function disables scanning
> > during recursion by tweaking the internal state.
> 
> Thanks.  I think this isn't exactly equivalent to the previous version though, 
> as the recursive call made through internal_arg_pointer_based_exp_1 will now 
> scan as well, won't it?  OK, my fault, the argument was probably better then.

I think it is.  Those called during internal_arg_pointer_based_exp_scan
will see scan_start equal to pc_rtx and won't scan, and for the calls after
it, while scan_start won't be pc_rtx, as it is after scan, it is either
NULL_RTX with no insns in the sequence, or some insn whose NEXT_INSN is
NULL, therefore it will attempt to scan, but won't scan a single insn.
But surely, if you prefer the explicit argument, I can test that version
too.

	Jakub



More information about the Gcc-patches mailing list