llvm-6502/lib/Transforms/Utils
Chandler Carruth d54f9a4c3b Move the instruction simplification of callsite arguments in the inliner
to instead rely on much more generic and powerful instruction
simplification in the function cloner (and thus inliner).

This teaches the pruning function cloner to use instsimplify rather than
just the constant folder to fold values during cloning. This can
simplify a large number of things that constant folding alone cannot
begin to touch. For example, it will realize that 'or' and 'and'
instructions with certain constant operands actually become constants
regardless of what their other operand is. It also can thread back
through the caller to perform simplifications that are only possible by
looking up a few levels. In particular, GEPs and pointer testing tend to
fold much more heavily with this change.

This should (in some cases) have a positive impact on compile times with
optimizations on because the inliner itself will simply avoid cloning
a great deal of code. It already attempted to prune proven-dead code,
but now it will be use the stronger simplifications to prove more code
dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153403 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-25 04:03:40 +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 Move the instruction simplification of callsite arguments in the inliner 2012-03-25 04:03:40 +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