[llvm-commits] Fold() function on TargetFolder class - removal of redundant constantexpr

Duncan Sands baldrick at free.fr
Tue Feb 22 05:21:49 PST 2011


Hi Jin Gu Kang,

> If we makes useless ConstantExpr with previous Global variable,
> replaceAllUsesWith() function will change useless ConstantExpr's previous Global variable
> to new Global variable. I think it is inefficient.

as you discovered, avoiding this is much more subtle than it appears.  If a
trivial change could deal with it, then I would be happy to make that change.
But this is not the case, which then raises the question: is it worth spending
time working on if there is in fact no measurable compile time impact?  If you
want to speed up compilation there are much better places to start.

Ciao, Duncan.



More information about the llvm-commits mailing list