freebsd-nq/lib/Analysis
2012-05-03 16:50:55 +00:00
..
IPA Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
AliasAnalysis.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
AliasAnalysisCounter.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
AliasAnalysisEvaluator.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
AliasDebugger.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
AliasSetTracker.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
Analysis.cpp Vendor import of llvm release_30 branch r142614: 2011-10-20 21:10:27 +00:00
BasicAliasAnalysis.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
BlockFrequencyInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
BranchProbabilityInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
CaptureTracking.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
CFGPrinter.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
CMakeLists.txt Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
CodeMetrics.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
ConstantFolding.cpp Vendor import of llvm release_31 branch r155985: 2012-05-03 16:50:55 +00:00
DbgInfoPrinter.cpp Vendor import of llvm release_30 branch r142614: 2011-10-20 21:10:27 +00:00
DebugInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
DIBuilder.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
DominanceFrontier.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
DomPrinter.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
InlineCost.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
InstCount.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
InstructionSimplify.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
Interval.cpp Update llvm to r84119. 2009-10-14 17:57:32 +00:00
IntervalPartition.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
IVUsers.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LazyValueInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LibCallAliasAnalysis.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
LibCallSemantics.cpp Vendor import of llvm r114020 (from the release_28 branch): 2010-09-17 15:48:55 +00:00
Lint.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LLVMBuild.txt Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
Loads.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LoopDependenceAnalysis.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LoopInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
LoopPass.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
Makefile Update LLVM to r96341. 2010-02-16 09:30:23 +00:00
MemDepPrinter.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
MemoryBuiltins.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
MemoryDependenceAnalysis.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
ModuleDebugInfoPrinter.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
NoAliasAnalysis.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
PathNumbering.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
PathProfileInfo.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
PathProfileVerifier.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
PHITransAddr.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
PostDominators.cpp Vendor import of llvm trunk r130700: 2011-05-02 19:34:44 +00:00
ProfileEstimatorPass.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
ProfileInfo.cpp Vendor import of llvm trunk r130700: 2011-05-02 19:34:44 +00:00
ProfileInfoLoader.cpp Vendor import of llvm trunk r130700: 2011-05-02 19:34:44 +00:00
ProfileInfoLoaderPass.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
ProfileVerifierPass.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
README.txt Update LLVM to r103004. 2010-05-04 16:11:02 +00:00
RegionInfo.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
RegionPass.cpp Vendor import of llvm release_30 branch r142614: 2011-10-20 21:10:27 +00:00
RegionPrinter.cpp Vendor import of llvm trunk r130700: 2011-05-02 19:34:44 +00:00
ScalarEvolution.cpp Vendor import of llvm release_31 branch r155985: 2012-05-03 16:50:55 +00:00
ScalarEvolutionAliasAnalysis.cpp Vendor import of llvm trunk r126079: 2011-02-20 12:57:14 +00:00
ScalarEvolutionExpander.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
ScalarEvolutionNormalization.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
SparsePropagation.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
Trace.cpp Vendor import of llvm trunk r154661: 2012-04-14 13:54:10 +00:00
TypeBasedAliasAnalysis.cpp Vendor import of llvm trunk r130700: 2011-05-02 19:34:44 +00:00
ValueTracking.cpp Vendor import of llvm release_31 branch r155985: 2012-05-03 16:50:55 +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))

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