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: PR target/52555: attribute optimize is overriding command line options


On 02/16/13 05:19, Richard Sandiford wrote:

Looks good to me otherwise, thanks.

Implemented all your suggestions.



Sorry that SWITCHABLE_TARGETS has been so much hassle. TBH, like Jakub says in the PR, I was hoping things like the optimize attribute could use the target_globals stuff too. Today we just care about optabs, but e.g. arm.c has:

   if (TARGET_THUMB1 && optimize_size)
     {
       /* When optimizing for size on Thumb-1, it's better not
         to use the HI regs, because of the overhead of
         stacking them.  */
       for (regno = FIRST_HI_REGNUM;
	   regno <= LAST_HI_REGNUM; ++regno)
	fixed_regs[regno] = call_used_regs[regno] = 1;
     }

which affects other cached global state like IRA tables.

... ...

So in the end I think we'll end up trying solve the same problem that
the SWITCHABLE_TARGETS stuff was trying to solve, but this time for
__attribute__((optimize)).

Ughhh... perhaps this can be something for 4.9, reimplementing the optimize attribute with the target_globals infrastructure?


Regstrapping attached patch.

OK pending tests?

Attachment: curr
Description: Text document


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