On 10/10/14 16:59, Richard Henderson wrote:
On 10/08/2014 08:31 AM, Jiong Wang wrote:
Ping ~
And as there is NONDEBUG_INSN_P check before move_insn_for_shrink_wrap invoked,
we could avoid creating new wrapper function by invoke single_set_2 directly.
I'm committing the following to fix this.
(1) Don't bother modifying single_set; just look for a bare SET.
(2) Tighten the set of expressions we're willing to move.
(3) Use direct "return false" in the failure case, rather than
counting a non-zero number of non-constants, etc.
Tested on x86_64, and against Andi's test case (unfortunately unreduced).
minor nit, after this patch, gcc.target/aarch64/shrink_wrap_symbol_ref_1.c
still not shrink-wrapped under -mabi=ilp32,
the reason is as Pinski reported, LO_SUM is with with RTX_OBJ class, while it
could be treated as expression.
in your fix, if it's RTX_OBJ, and LO_SUM, then the move aborted by return NULL.
anyway, thanks for the fix, I verified the shrink-wrapping of some hotpot
functions in benchmark on aarch64 are not affected.
Regards,
Jiong
r~