some tree-ssa vs mainline stats
Gerald Pfeifer
pfeifer@dbai.tuwien.ac.at
Fri Jun 20 01:08:00 GMT 2003
On Thu, 19 Jun 2003, Dan Nicolaescu wrote:
>>> Also there's a lot of "if (1)" and "if (0)" code.
>> I'd love to have a compilable example. If we've got if (1) or if (0) code
>> lying around, I'd definitely want to have a deeper look.
> Sure, compile the attached code with the c++ compiler.
> It's from PR8361, I have no idea what the code does.
I ought to have. ;-)
Jeff/Dan, if you have any questions, please point me to the code in
question and I'll try to provide some explanations (without referring
to journal papers or my PhD thesis, promised <g>).
> There are a lot of class and template definitions, that have a lot of
> inline functions, but just 2 functions defined at the top level:
> "sameComponentInHead" and "MODEL_GENERATOR::initialiseRules".
> The .optimized dump for the first one has a few if (1)s and the second
> has some if (0)s.
I had a look, and sameComponentInHead() invokes getAtomComponent(). The
second parameter of that function is bool assert=true, so when we inline
it and the user does not specify that parameter explicitly (as is the case
here), the if-statement inside getAtomComponent() becomes an if(true)
which is what I assume you have been seeing.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.pfeifer.com/gerald/
More information about the Gcc
mailing list