This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disable -fipa-ra for naked functions (PR target/85593)


On 12/6/18 4:34 PM, Jakub Jelinek wrote:
> Hi!
> 
> The only documented supported content of naked functions is basic asm
> statement(s).  Those don't have clobbers though, so we should ignore
> naked functions for IPA-RA; if they are written the only supported way,
> they will appear not to clobber any registers at all and IPA-RA will then
> assume they don't clobber any registers.
> While naked is a target attribute supported only on a subset of targets,
> the generic code already handles it in multiple spots, so I think we can add
> another spot rather than introducing a target hook for it.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/85593
> 	* final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
> 	for functions with naked attribute.
> 
> 	* gcc.target/i386/pr85593.c: New test.
OK
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]