[PM] Port instcombine to the new pass manager!
authorChandler Carruth <chandlerc@gmail.com>
Sat, 24 Jan 2015 04:19:17 +0000 (04:19 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 24 Jan 2015 04:19:17 +0000 (04:19 +0000)
commit7a98df7f74f7ffc94f1684ad4b8dfb056fbcd787
treeb3160f042136ff81b38789c5f651cc3895a41bd8
parent5d8bb5c7c5412fa6f54d5c9d6cf1878ed772a240
[PM] Port instcombine to the new pass manager!

This is exciting as this is a much more involved port. This is
a complex, existing transformation pass. All of the core logic is shared
between both old and new pass managers. Only the access to the analyses
is separate because the actual techniques are separate. This also uses
a bunch of different and interesting analyses and is the first time
where we need to use an analysis across an IR layer.

This also paves the way to expose instcombine utility functions. I've
got a static function that implements the core pass logic over
a function which might be mildly interesting, but more interesting is
likely exposing a routine which just uses instructions *already in* the
worklist and combines until empty.

I've switched one of my favorite instcombine tests to run with both as
well to make sure this keeps working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226987 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/InstCombine/InstCombine.h [new file with mode: 0644]
include/llvm/Transforms/InstCombine/InstCombineWorklist.h [new file with mode: 0644]
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineWorklist.h [deleted file]
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/load.ll
tools/opt/PassRegistry.def
tools/opt/Passes.cpp