OSDN Git Service

IfConversion: Rescan diamonds.
authorKyle Butt <kyle+llvm@iteratee.net>
Thu, 18 Aug 2016 22:09:25 +0000 (22:09 +0000)
committerKyle Butt <kyle+llvm@iteratee.net>
Thu, 18 Aug 2016 22:09:25 +0000 (22:09 +0000)
commitbfd62a4b4465dd21811bf615c3b04c30ddb09f7b
tree8e9ddf14a08b0a7b9268672d9dbdbc11db87e78b
parent1eee0ec321ecfe4fecb8016e21ce1fe0d73c37bd
IfConversion: Rescan diamonds.

The cost of predicating a diamond is only the instructions that are not shared
between the two branches. Additionally If a predicate clobbering instruction
occurs in the shared portion of the branches (e.g. a cond move), it may still
be possible to if convert the sub-cfg. This change handles these two facts by
rescanning the non-shared portion of a diamond sub-cfg to recalculate both the
predication cost and whether both blocks are pred-clobbering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279167 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IfConversion.cpp