llvm-6502/lib/Transforms
Michael Zolotukhin 710ce5d36b Implement new heuristic for complete loop unrolling.
Complete loop unrolling can make some loads constant, thus enabling a
lot of other optimizations. To catch such cases, we look for loads that
might become constants and estimate number of instructions that would be
simplified or become dead after substitution.

Example:
Suppose we have:
int a[] = {0, 1, 0};
v = 0;
for (i = 0; i < 3; i ++)
  v += b[i]*a[i];

If we completely unroll the loop, we would get:
v = b[0]*a[0] + b[1]*a[1] + b[2]*a[2]

Which then will be simplified to:
v = b[0]* 0 + b[1]* 1 + b[2]* 0

And finally:
v = b[1]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 02:34:00 +00:00
..
Hello [CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32. 2014-07-13 13:36:48 +00:00
InstCombine Move EH personality type classification to Analysis/LibCallSemantics.h 2015-01-28 01:17:38 +00:00
Instrumentation SpecialCaseList: Add support for parsing multiple input files. 2015-02-04 17:39:48 +00:00
IPO Add range adapters predecessors() and successors() for BBs 2015-02-04 19:14:57 +00:00
ObjCARC IR: Split Metadata from Value 2014-12-09 18:38:53 +00:00
Scalar Implement new heuristic for complete loop unrolling. 2015-02-05 02:34:00 +00:00
Utils Utils: Resolve cycles under distinct MDNodes 2015-02-04 19:44:34 +00:00
Vectorize [LV] Split off memcheck block really at the first check 2015-02-03 22:45:39 +00:00
CMakeLists.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Makefile Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00