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] SH : Add target specific option -msort-data for SH-ELFtarget


Anil Paranjape wrote:
> Hi Zack,
> 
> Thank you for your comments.
> It would be really useful if this is done target independent.

I've since noticed that you or someone else at KPT posted a similar patch for
the H8 back end...

> As far as my knowledge is concerned, it requires change in
> "gcc/varasm.c".

Yes, that's where I would start.

> How to relate this feature with "-Os" option so as not to enable it by
> default ?

if (optimize_size) { ... }

Better, create a new generic -fsort-data option (common.opt) which is turned
on by optimize_size.

> Kindly guide me on how to write this patch so that it will be target
> independent.

sorry, I can't answer such a vague question.  Try moving your existing code to
varasm.c, guided by optimize_size.  If you find, while you are doing that,
that you have specific questions to ask, then I'll be happy to answer them.

zw


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