llvm-6502/lib/Analysis
Bill Wendling 6765834754 Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09 07:45:08 +00:00
..
IPA
AliasAnalysis.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
Analysis.cpp
BasicAliasAnalysis.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
BlockFrequencyInfo.cpp
BranchProbabilityInfo.cpp
CaptureTracking.cpp Give CaptureTracker::shouldExplore a base implementation. Most users want to do 2012-10-08 22:12:48 +00:00
CFGPrinter.cpp
CMakeLists.txt
CodeMetrics.cpp Create enums for the different attributes. 2012-10-09 07:45:08 +00:00
ConstantFolding.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
DbgInfoPrinter.cpp
DominanceFrontier.cpp
DomPrinter.cpp
InlineCost.cpp Create enums for the different attributes. 2012-10-09 07:45:08 +00:00
InstCount.cpp
InstructionSimplify.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LazyValueInfo.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LLVMBuild.txt
Loads.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LoopDependenceAnalysis.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LoopInfo.cpp
LoopPass.cpp
Makefile
MemDepPrinter.cpp
MemoryBuiltins.cpp Remove more uses of the attribute enums by supplying appropriate query methods for them. 2012-10-09 00:28:54 +00:00
MemoryDependenceAnalysis.cpp Create enums for the different attributes. 2012-10-09 07:45:08 +00:00
ModuleDebugInfoPrinter.cpp
NoAliasAnalysis.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
PathNumbering.cpp
PathProfileInfo.cpp
PathProfileVerifier.cpp
PHITransAddr.cpp
PostDominators.cpp
ProfileDataLoader.cpp
ProfileDataLoaderPass.cpp
ProfileEstimatorPass.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
ScalarEvolutionNormalization.cpp
SparsePropagation.cpp
Trace.cpp
TypeBasedAliasAnalysis.cpp
ValueTracking.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +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))

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