This is the mail archive of the 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: Architecture-dependent optimizations

> Hi all,
> I'm trying to compile an application for two different target architectures 
> using gcc. My goal is to obtain 2 output binaries that have the same control 
> flow graph structure. The problem is that , some architecture-dependent 
> optimizations tend to modify the cfg structure by removing/merging basic 
> blocks etc. Trying to disable such optimizations (using command line 
> options), I found that this was rather a complex task cause they are 
> dispersed across different  optimization passes, and some times mixed with 
> other types of optimizations.
> So my question is : Is there a simple and clean way to disable/enable 
> architecture-dependent optimizations that affect the cfg structure in gcc?

No, in fact almost every optimization does affect (for instance CSE
might introduce dead instruction that might in turn result in
ellimination of basic blocks and such).
What do you need this for?  Perhaps you can get bit out of current gcov
graph dumping support...

> Thanks in advance for any hint or comment
> Aimen

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