[PATCH][IRA,LRA] Fix PR87466, all pseudos live across setjmp are spilled

Vladimir Makarov vmakarov@redhat.com
Thu Oct 4 03:12:00 GMT 2018


On 10/02/2018 02:51 PM, Peter Bergner wrote:
> On 10/2/18 1:21 PM, Segher Boessenkool wrote:
>> On Tue, Oct 02, 2018 at 11:42:19AM -0500, Peter Bergner wrote:
>>> +/* The default implementation of TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P.  */
>>> +
>>> +bool
>>> +default_setjmp_preserves_nonvolatile_regs_p (void)
>>> +{
>>> +  return false;
>>> +}
>> You can just use hook_bool_void_false for this (and hook_bool_void_true
>> for e.g. the rs6000 implementation).
> Yes, much nicer and smaller patch using those functions!  So here's version 3,
> which is the same as version 2 but using above mentioned hook functions.
>
> This is currently bootstrapping right now, ok now assuming no regressions?
>
Ok for me.  Thank you for working on this issue, Peter.
> gcc/
> 	PR rtl-optimization/87466
> 	* target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
> 	* doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
> 	* doc/tm.texi: Regenerate.
> 	* ira-lives.c (process_bb_node_lives): Use the new target hook.
> 	* lra-lives.c (process_bb_lives): Likewise.
> 	* config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
> 	Define.
>
> gcc/testsuite/
> 	PR rtl-optimization/87466
> 	* gcc.target/powerpc/pr87466.c: New test.



More information about the Gcc-patches mailing list