On Sun, May 2, 2010 at 6:45 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >> On Sat, May 1, 2010 at 2:36 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >> >> >> >> Vortex needs -fno-strict-aliasing. It casts between two record types >> >> with one record being a 'prefix' of another. >> > >> > So today runs are complette. Thanks to Richi who fixed ICE in symtab >> > merging >> > that affected perl and GCC. With vortex problem was that in addition to >> > -fno-strict-aliasing it is writting to closed files that cause ICE >> > depending on >> > partiuclar glibc version. >> > >> > Comparing >> > http://gcc.opensuse.org/SPEC/CINT/sb-frescobaldi.suse.de-fdo-64-FDO/recent.html >> > vortex is 2036 with -O2 -flto, 2438 with -O2 -flto and FDO (so about 20% >> > improvement) >> > http://gcc.opensuse.org/SPEC/CINT/sb-frescobaldi.suse.de-head-64/list.html >> > has -O2 runs without LTO that is 1859, so 31% for LTO+FDO, 10% LTO. >> > >> > Any idea if it is one of value transforms or just edge profile making the >> > difference? There are some cases of write only globals we can constant >> > propagate with -fwhole-program in SPEC, but I think it is parser. >> > >> >> I got the following number for O2, FDO, and LIPO : 2351, 2761 (17%), 3448 >> (24%). >> >> The FDO improvement over O2 come from both edge profile and vpt >> (div,rem). With FDO, one of the important loops in Part_Delete may get > > I see. I am particularly interested in the div/rem transform. With LTO such > things are sometimes doable at compile time (propagating that the divisor is > know constant value). We currently make no constant propagation across global > variables except for simple detection if it is readonly and initialized. It > would be possible to be a bit smarter here and look for vars that are only > used > to store a constant value into it and then replace all the division/rem by > that > constant counting on fact that the value 0 can not reach the division. > > Is this case detectable at compile time without feedback?
That depends. The following cases exist in vortex: 1) the value is runtime constant -- it is read from input file but never changed -- e.g.: QueBug. Nothing can be done by the compiler in this case; 2) Global variable written only once in the program, e.g StrucAlignment. Compiler needs to prove that the definition dominates (interprocedurally) all uses. Sjeng has similar cases. 3) The simplest case -- global variable only initialized statically and never written in the program -- compiler should be able to recognize it. 4) Local variable with known constant value sets -- AllocSize -- can be handled by compiler with the help of static prediction. David > > Honza >> tail duplicated which helps performance. >> >> LIPO improvement mainly come from cross module ininling of hot >> functions Mem_GetWord, Mem_GetAddr, Chunk_ChkGetChunk. >> >> David >> >> >> > Honza >> >> >> >> David >> >> >> >> >> >> >> >> > Honza >> >> > >> > >