llvm-6502/lib/Analysis
Andrew Trick ed38f1ca2e Remove the temporary flag -disable-unroll-scev and dead code.
SCEV should now be used for trip count analysis, not LoopInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-28 19:22:09 +00:00
..
IPA build: Add initial cut at LLVMBuild.txt files. 2011-11-03 18:53:17 +00:00
AliasAnalysis.cpp Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions. 2011-09-26 20:15:28 +00:00
AliasAnalysisCounter.cpp Teach AliasAnalysisCounter about PartialAlias. 2010-12-10 19:53:05 +00:00
AliasAnalysisEvaluator.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
AliasDebugger.cpp Extend the AliasAnalysis::pointsToConstantMemory interface to allow it 2010-11-08 16:45:26 +00:00
AliasSetTracker.cpp Atomic load/store support in LICM. 2011-08-15 20:52:09 +00:00
Analysis.cpp C API functions must be able to see their extern "C" definitions, or it will be impossible to call them from C. 2011-08-19 01:36:54 +00:00
BasicAliasAnalysis.cpp Refactor code to use new attribute getters on CallSite for NoCapture and ByVal. 2011-11-20 19:09:04 +00:00
BlockFrequencyInfo.cpp Add pass printing support to BlockFrequencyInfo pass. The implementation 2011-10-19 10:12:41 +00:00
BranchProbabilityInfo.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
CaptureTracking.cpp Fix crasher in GVN due to my recent capture tracking changes. 2011-11-21 19:42:56 +00:00
CFGPrinter.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
CMakeLists.txt Rewrite the CMake build to use explicit dependencies between libraries, 2011-07-29 00:14:25 +00:00
ConstantFolding.cpp Fixes following the CR by Chris and Duncan: 2011-08-29 19:58:36 +00:00
DbgInfoPrinter.cpp Fix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used uninitialized in this function. 2011-09-21 23:34:23 +00:00
DebugInfo.cpp Update DebugInfoFinder to match recent debug info encoding changes. 2011-10-17 22:30:34 +00:00
DIBuilder.cpp Fix typo in comment. 2011-11-09 22:45:04 +00:00
DominanceFrontier.cpp Move DominanceFrontier from VMCore to Analysis. 2011-01-18 06:06:27 +00:00
DomPrinter.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
InlineCost.cpp A FIXME about block addresses and indirectbr. 2011-10-20 04:05:33 +00:00
InstCount.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
InstructionSimplify.cpp Fix code to match comment. Fixes PR11340, a regression from r143209. 2011-11-08 21:08:02 +00:00
Interval.cpp
IntervalPartition.cpp Now with fewer extraneous semicolons! 2010-10-07 22:25:06 +00:00
IVUsers.cpp Slightly more useful tracing. 2011-10-13 17:06:38 +00:00
LazyValueInfo.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
LibCallAliasAnalysis.cpp Now with fewer extraneous semicolons! 2010-10-07 22:25:06 +00:00
LibCallSemantics.cpp Thread const correctness through a bunch of AliasAnalysis interfaces and 2010-08-03 21:48:53 +00:00
Lint.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
LLVMBuild.txt build: Add initial cut at LLVMBuild.txt files. 2011-11-03 18:53:17 +00:00
Loads.cpp Add some comments here because the lack of a check for volatile/atomic here is a bit unusual. 2011-08-15 21:56:39 +00:00
LoopDependenceAnalysis.cpp Misc analysis passes that need to be aware of atomic load/store. 2011-08-15 20:54:19 +00:00
LoopInfo.cpp Remove the temporary flag -disable-unroll-scev and dead code. 2011-11-28 19:22:09 +00:00
LoopPass.cpp Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
MemDepPrinter.cpp Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases. 2011-10-13 22:14:57 +00:00
MemoryBuiltins.cpp Validate the return type when checking if a function is malloc. 2011-11-23 17:58:47 +00:00
MemoryDependenceAnalysis.cpp Fix crasher in GVN due to my recent capture tracking changes. 2011-11-21 19:42:56 +00:00
ModuleDebugInfoPrinter.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
NoAliasAnalysis.cpp Use the new addEscapingValue callback to update GlobalsModRef when GVN adds PHIs of GEPs. For the moment, 2011-01-03 23:51:43 +00:00
PathNumbering.cpp Add this back in for now. There are still a few passes which create unwind instructions at the moment. 2011-08-03 01:07:57 +00:00
PathProfileInfo.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PathProfileVerifier.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
PHITransAddr.cpp Shorten some expressions by using ArrayRef::slice(). 2011-07-25 15:13:01 +00:00
PostDominators.cpp remove postdom frontiers, because it is dead. Forward dom frontiers are 2011-04-05 21:57:17 +00:00
ProfileEstimatorPass.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
ProfileInfo.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ProfileInfoLoader.cpp Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
ProfileInfoLoaderPass.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
ProfileVerifierPass.cpp Move code into anonymous namespaces. 2011-11-26 23:01:57 +00:00
README.txt When checking whether the special handling for an addrec increment which 2010-04-26 21:46:36 +00:00
RegionInfo.cpp Missed some users of Value::getNameStr. 2011-11-15 18:30:06 +00:00
RegionPass.cpp Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
RegionPrinter.cpp RegionPrinter: Ignore back edges when layouting the graph 2011-02-27 04:11:07 +00:00
ScalarEvolution.cpp SCEV: Actually set overflow flags on add expressions. 2011-11-20 10:24:36 +00:00
ScalarEvolutionAliasAnalysis.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
ScalarEvolutionExpander.cpp Fix SCEVExpander assert during LSR: "argument of incompatible type". 2011-10-15 06:19:55 +00:00
ScalarEvolutionNormalization.cpp Fix memory corruption I introduced a few checkins ago. 2011-10-13 18:49:23 +00:00
SparsePropagation.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
Trace.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
TypeBasedAliasAnalysis.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ValueTracking.cpp Fix a crash in which a multiplication was being reported as being both negative 2011-11-23 16:26:47 +00:00

Analysis Opportunities:

//===---------------------------------------------------------------------===//

In test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll, the
ScalarEvolution expression for %r is this:

  {1,+,3,+,2}<loop>

Outside the loop, this could be evaluated simply as (%n * %n), however
ScalarEvolution currently evaluates it as

  (-2 + (2 * (trunc i65 (((zext i64 (-2 + %n) to i65) * (zext i64 (-1 + %n) to i65)) /u 2) to i64)) + (3 * %n))

In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.

//===---------------------------------------------------------------------===//

In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll,

ScalarEvolution is forming this expression:

((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))

This could be folded to

(-1 * (trunc i64 undef to i32))

//===---------------------------------------------------------------------===//