[LIR] Remove the dedicated class for popcount recognition and sink the
authorChandler Carruth <chandlerc@gmail.com>
Thu, 13 Aug 2015 00:44:29 +0000 (00:44 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 13 Aug 2015 00:44:29 +0000 (00:44 +0000)
commit118bc241c3553eecb303c7fa2b91e97245749f5f
treedf32e10dfc6c8540476dec63d466983e26aa0d95
parentfe4c063626298beecb17fde78b8c044b16d0d6e7
[LIR] Remove the dedicated class for popcount recognition and sink the
code into methods on LoopIdiomRecognize.

This simplifies the code somewhat and also makes it much easier to move
the analyses around. Ultimately, the separate class wasn't providing
significant value over methods -- it contained the precondition basic
block and the current loop. The current loop is already available and
the precondition block wasn't needed everywhere and is easy to pass
around.

In several cases I just moved things to be static functions because they
already accepted most of their inputs as arguments.

This doesn't fix the way we manage analyses yet, that will be the next
patch, but it already makes the code over 50 lines shorter.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244851 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopIdiomRecognize.cpp