On Thu, Sep 9, 2010 at 10:46 AM, Richard Guenther <richard.guent...@gmail.com> wrote: >> 1) Is this a valid optimization in general to attempt wrt other targets >> (i.e. prevent replacement across calls)? > > I think it makes sense in general.
ISTR we even used to do so in the past...? >> 2) Is there a way to recognize the __builtin_XXX() calls such that we know >> they result in simple insns an not a real call? > > Unfortunately not easily. What about just discounting all builtins? Or allow replacing across a BUILT_IN_MD but not other built-ins. BUILT_IN_NORMAL is more likely to result in a real function call than an MD builtin. I think you should allow TER across some GIMPLE calls if you can be reasonably sure that the GIMPLE call will not result in an actual call insn. It'd be a bit of "fake accuracy". For example, you also can't avoid replacing across GIMPLE non-call statements that expand to libcalls and such... Ciao! Steven