[llvm-commits] [llvm] r155136 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineShifts.cpp test/Transforms/InstCombine/2010-11-01-lshr-mask.ll test/Transforms/InstCombine/apint-shift.ll test/Transforms/InstCombine/cast.ll test/Transforms/In

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Apr 19 17:53:26 PDT 2012


On Apr 19, 2012, at 5:05 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:

> I think we have to accept that "don't obfuscate existing patterns" should also be a goal of InstCombine.

To clarify this, the theoretical goal of InstCombine may be to arrive at a canonical expression, but that is not what it does in practice. In practice, it is iteratively applying small transformations, hoping to move closer to the 'canonical form'. It is not able to distinguish a local maximum from a global maximum in terms of 'canonicalness'.

The local minimum is in some sense closer to the original program than the global fully canonicalized program. I am suggesting that this is a good thing because patterns that were present in the original program are more likely to be discoverable in the optimized program.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120419/21b8ecaa/attachment.html>


More information about the llvm-commits mailing list