OSDN Git Service

[InstCombine] morph an existing instruction instead of creating a new one
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 15:11:33 +0000 (15:11 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 15:11:33 +0000 (15:11 +0000)
commite930b092c40863aa23ca4ac41565958d9b348140
treed1e3aac9c6bdc147e50c1932c8324ba82d7357d3
parentdf5e51ce8f9fe9c4508609e9fcd6bcf52b801410
[InstCombine] morph an existing instruction instead of creating a new one

One potential way to make InstCombine (very slightly?) faster is to recycle instructions
when possible instead of creating new ones. It's not explicitly stated AFAIK, but we don't
consider this an "InstSimplify". We could, however, make a new layer to house transforms
like this if that makes InstCombine more manageable (just throwing out an idea; not sure
how much opportunity is actually here).

Differential Revision: https://reviews.llvm.org/D31863

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300067 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/select-cmp-br.ll
test/Transforms/LoopVectorize/if-conversion.ll
test/Transforms/SimplifyCFG/merge-cond-stores.ll