llvm-6502/lib/Transforms/Utils
Chandler Carruth f8c8a9cbb4 Teach the function cloner (and thus the inliner) to simplify PHINodes
aggressively. There are lots of dire warnings about this being expensive
that seem to predate switching to the TrackingVH-based value remapper
that is automatically updated on RAUW. This makes it easy to not just
prune single-entry PHIs, but to fully simplify PHIs, and to recursively
simplify the newly inlined code to propagate PHINode simplifications.

This introduces a bit of a thorny problem though. We may end up
simplifying a branch condition to a constant when we fold PHINodes, and
we would like to nuke any dead blocks resulting from this so that time
isn't wasted continually analyzing them, but this isn't easy. Deleting
basic blocks *after* they are fully cloned and mapped into the new
function currently requires manually updating the value map. The last
piece of the simplification-during-inlining puzzle will require either
switching to WeakVH mappings or some other piece of refactoring. I've
left a FIXME in the testcase about this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153410 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-25 10:34:54 +00:00
..
AddrModeMatcher.cpp
BasicBlockUtils.cpp Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary) 2012-01-17 04:43:56 +00:00
BreakCriticalEdges.cpp
BuildLibCalls.cpp
CloneFunction.cpp Teach the function cloner (and thus the inliner) to simplify PHINodes 2012-03-25 10:34:54 +00:00
CloneModule.cpp
CMakeLists.txt Remove the basic inliner. This was added in 2007, and hasn't really 2012-03-15 01:37:56 +00:00
CmpInstAnalysis.cpp Convert assert(0) to llvm_unreachable 2012-02-07 05:05:23 +00:00
CodeExtractor.cpp Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
DemoteRegToStack.cpp Remove redundant comment. Use a more efficient datatype. 2012-02-17 02:12:54 +00:00
InlineFunction.cpp Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These 2012-02-25 02:56:01 +00:00
InstructionNamer.cpp
LCSSA.cpp
LLVMBuild.txt
Local.cpp Add an asserting ValueHandle to the block simplification code which will 2012-03-25 03:29:25 +00:00
LoopSimplify.cpp LoopSimplify bug fix. Handle indirect loop back edges. 2012-03-20 21:24:52 +00:00
LoopUnroll.cpp
LoopUnrollRuntime.cpp
LowerExpectIntrinsic.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00
LowerInvoke.cpp [unwind removal] We no longer have 'unwind' instructions being generated, so 2012-02-06 21:16:41 +00:00
LowerSwitch.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00
Makefile
Mem2Reg.cpp
ModuleUtils.cpp
PromoteMemoryToRegister.cpp Switch mem2reg to use the new hashing infrastructure. 2012-03-05 11:29:56 +00:00
SimplifyCFG.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00
SimplifyIndVar.cpp Remove unused simplifyIVUsers 2012-03-22 17:47:30 +00:00
SimplifyInstructions.cpp
SSAUpdater.cpp
UnifyFunctionExitNodes.cpp [unwind removal] We no longer have 'unwind' instructions being generated, so 2012-02-06 21:16:41 +00:00
Utils.cpp
ValueMapper.cpp