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 Add a little heuristic to Value::isUsedInBasicBlock to speed it up for small basic blocks. 2011-12-05 17:23:27 +00:00
BasicBlockUtils.cpp Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary) 2012-01-17 04:43:56 +00:00
BreakCriticalEdges.cpp SplitBlockPredecessors uses ArrayRef instead of Data and Size. 2011-12-09 21:19:53 +00:00
BuildLibCalls.cpp Add support for custom names for library functions in TargetLibraryInfo. Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom 2011-11-17 01:27:36 +00:00
CloneFunction.cpp Teach the function cloner (and thus the inliner) to simplify PHINodes 2012-03-25 10:34:54 +00:00
CloneModule.cpp Fix llvm::CloneModule to correctly clone globals. Patch per bug report by Simon Moll on llvmdev. 2011-08-15 21:05:06 +00:00
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 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LCSSA.cpp There is no need to force DebugLoc on a PHI at this point. 2011-05-16 22:05:03 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
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 Avoid a confusing assert for silly options: -unroll-runtime -unroll-count=1. 2011-12-16 02:03:48 +00:00
LoopUnrollRuntime.cpp - Use getExitingBlock instead of getExitingBlocks. 2011-12-18 21:52:30 +00:00
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 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
Mem2Reg.cpp Remove outdated references to dominance frontiers. 2011-01-18 03:53:26 +00:00
ModuleUtils.cpp [asan] fix a bug (issue 19) where dlclose and the following mmap caused a false positive. compiler part. 2011-12-15 21:59:03 +00:00
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 Propagate TargetLibraryInfo throughout ConstantFolding.cpp and 2011-12-01 03:08:23 +00:00
SSAUpdater.cpp Make headers standalone, move a virtual method out of line. 2011-11-14 17:22:45 +00:00
UnifyFunctionExitNodes.cpp [unwind removal] We no longer have 'unwind' instructions being generated, so 2012-02-06 21:16:41 +00:00
Utils.cpp Add a new convenience pass for testing InstructionSimplify. Previously 2010-12-20 20:54:37 +00:00
ValueMapper.cpp We need to map DebugLoc. It leads to Fuction * (through subprogram entry node) which should be appropriately mapped. 2011-08-04 20:02:18 +00:00