[testsuite, pretty-ipa?] Changes to gcc.dg/ipa tests so that they pass on pretty-ipa

Jan Hubicka hubicka@ucw.cz
Wed Mar 24 18:31:00 GMT 2010


> Hi,
> 
> On Wed, Mar 24, 2010 at 04:13:06PM +0100, Jan Hubicka wrote:
> > > OK, the modified patch is below.  It now also contains modifications
> > > to g++.dg/ipa/iinline-1.C since that testcase falls into the same
> > > category.
> > 
> > In a way GCC might be creative enough to conclude that 100 iterations per program
> > execution is not enough for code size optimization, but I guess we won't go for that
> > (because we would end up with another dificult to tune parameter).
> > It might be safer to thus have global variable determining number of iterations but I am fine
> > with the patch as it is.  So it is OK.
> 
> I can always add a few zeroes :-) But lets deal with that after the
> problem manifests itself.
> 
> > > 
> > > BTW, the rest of the failures seem to be caused by the fact that main
> > > is considered to be cold and there is no interprocedural element to
> > > it.  Thus I intend to "fix" them by marking main with the hot
> > > attribute.
> > 
> > Hmm, ipa-cp should not prevent propagation _from_ main just because main itself
> > is known to be executed once (i.e. by propagating constants out one does not increase
> > code size).  So there should be no need for adding hot attribute.  What precisely
> > goes wrong here?
> 
> This has nothing to do with IPA-CP or anything interprocedural.  It's
> testcases like: gcc.dg/tree-ssa/loadpre1.c in which some optimizations
> we check for do not occur in main (often the only function in the
> testcase) because of profitability estimates.

Ah yes, well if it is not executable testcase I would go with renaming main to something else.
Otherwise either loop trick or hot attribute.

Honza



More information about the Gcc-patches mailing list