------- Comment #10 from hubicka at ucw dot cz 2008-01-08 14:14 ------- Subject: Re: Inlining heuristics issue
> yes, many PHIs are eliminated by coalescing. If you wanted to experiment at > some point for more accuracy, you can look at the PHI arguments. Any argument > which has a different base name than the LHS of the PHI, or is a constant, > *will* be a copy if the PHI remains. Hmm, good point, figuring out PHI arguemnts with constant or different bases is easy. Still we for reason don't account constants nor copy instructions in attempt to guess what will remain important after optimization and I am not sure we want to make PHIs an exception. This function is typical example that has chance to optimize well after inlining, so the decision is not that unreasonable. I guess for now I will stay with the simple SWITCH statement cost estimate (we don't want to copy too giant SWITCH and we don't want to overestimate very simple SWITChes as we do now) and play with this more with my patch that separate speed and size estiamtes for inliner I have in queue for next stage1. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34708