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, mips, tree] align microMIPS functions to 16 bits with -Os


Sandra Loosemore <sandra@codesourcery.com> writes:

> On 05/19/2014 01:38 PM, Sandra Loosemore wrote:
>>
>> 2014-05-19  Iain Sandoe  <iain@codesourcery.com>
>>          Catherine Moore  <clm@codesourcery.com>
>>          Sandra Loosemore  <sandra@codesourcery.com>
>>
>>      gcc/
>>      * config/mips/mips.c (mips_set_current_function): Choose
>>      function alignment once the current mode is known.
>>
>>      gcc/testsuite/
>>      * gcc.target/mips/umips-align-1.c: New.
>>      * gcc.target/mips/umips-align-2.c: New.
>>      * gcc.target/mips/umips-align-3.c: New.
>>      * gcc.target/mips/mips.exp: Add interlink-compressed to
>>      -mfoo/-mno-foo options.
>
> Ping?
>
> https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01536.html
>
> -Sandra

FAOD, I wasn't commenting because I still think it's the wrong place but
still don't have a specific counter-suggestion.  mips_set_current_function
is potentially called many times for the same function but setting the
alignment seems like something that should only happen once.  I think it
could potentially mean that alignment tests against the function address
could be optimised away based on the FUNCTION_BOUNDARY before
mips_set_current_function is called.

As a strawman, maybe adding a new target hook to cgraph_create_node
would work?  Hopefully that'll prompt someone to say how stupid that
idea is and say what the right way of doing it would be.

Thanks,
Richard


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