OSDN Git Service

[x86] Refactor the CMOV conversion pass to be more flexible.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 19 Aug 2017 04:28:20 +0000 (04:28 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 19 Aug 2017 04:28:20 +0000 (04:28 +0000)
commit5f49ff955e4b1abc03e1279a797ed3c6115a0ecd
tree4a278cbfb59c5224aa71808e2613ef188df8334c
parent484d59e444283606dfcde5457f533e921c33860e
[x86] Refactor the CMOV conversion pass to be more flexible.

The primary thing that this accomplishes is to allow future re-use of
these routines in more contexts and clarify the behavior w.r.t. loops.
For example, if handling outer loops is desirable, doing so in
a inside-out order becomes straight forward because it walks the loop
nest itself (rather than walking the function's basic blocks) and
de-couples the CMOV rewriting from the loop structure as there isn't
actually anything loop-specific about this transformation.

This patch should be essentially a no-op. It potentially changes the
order in which we visit the inner loops, but otherwise should merely set
the stage for subsequent changes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311225 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86CmovConversion.cpp