[llvm-commits] [llvm] r122399 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombine.h lib/Transforms/InstCombine/InstCombineAddSub.cpp lib/Transforms/InstCombine/InstCombineAndOrXor.cpp lib/Transforms/InstCombine/InstCombineMulDivRem.cpp lib/Transforms/InstCombine/InstructionCombining.cpp test/Transforms/InstCombine/2010-11-23-Distributed.ll

Chris Lattner clattner at apple.com
Tue Dec 28 10:44:57 PST 2010


On Dec 27, 2010, at 5:50 AM, Duncan Sands wrote:

> Hi Chris,
> 
>>> Add a generic expansion transform: A op (B op' C) ->  (A op B) op' (A op C)
>>> if both A op B and A op C simplify.  This fires fairly often but doesn't
>>> make that much difference.  On gcc-as-one-file it removes two "and"s and
>>> turns one branch into a select.
>> 
>> Hi Duncan,
>> 
>> I'm a bit concerned about the compile time cost of this.  If this isn't kicking in much, is it really worth it?  Have you looked to see if this causes a compile time hit?
> 
> I checked compilation time on gcc-as-one-big-file and I didn't see any
> significant difference in compile time.  If anything instcombine is faster
> with this change!  That's actually possible: the new logic fires quite often
> but doesn't make much difference because the existing logic caught most of the
> cases already some other way.  If the new logic gets them faster/cheaper than
> the old logic, for example in one step rather than after several, then that
> would result in a speedup.  But as I said, the difference isn't statistically
> significant.

Ok, great!  Thanks for checking,

-Chris



More information about the llvm-commits mailing list