llvm-6502/lib/Analysis
Michael Liao 14f5cb6f9a Indentation fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221472 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-06 19:05:57 +00:00
..
IPA
AliasAnalysis.cpp Reformat partially, where I touched for whitespace changes. 2014-10-28 11:54:52 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp Use AA in LoadCombine 2014-11-03 23:19:16 +00:00
Analysis.cpp
AssumptionTracker.cpp Clean up assume intrinsic pattern matching, no need to check that the argument is a value. 2014-10-25 18:09:01 +00:00
BasicAliasAnalysis.cpp
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp [InstSimplify] Support constant folding to vector of pointers 2014-10-22 12:18:48 +00:00
CostModel.cpp
Delinearization.cpp
DependenceAnalysis.cpp Reformat partially, where I touched for whitespace changes. 2014-10-28 11:54:52 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
FunctionTargetTransformInfo.cpp
InstCount.cpp
InstructionSimplify.cpp InstSimplify: Exact shifts of X by Y are X if X has the lsb set 2014-11-05 00:59:59 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
JumpInstrTableInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [LVI] Add some additional comments about caching and context instructions 2014-10-16 00:40:05 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp remove function names from comments; NFC 2014-10-21 18:26:57 +00:00
Lint.cpp
LLVMBuild.txt
Loads.cpp Revert "Teach the load analysis to allow finding available values which require" (r220277) 2014-10-21 23:49:52 +00:00
LoopInfo.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
LoopPass.cpp
Makefile
MemDepPrinter.cpp
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
ModuleDebugInfoPrinter.cpp
NoAliasAnalysis.cpp
PHITransAddr.cpp
PostDominators.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
SparsePropagation.cpp
StratifiedSets.h
TargetTransformInfo.cpp Add minnum / maxnum intrinsics 2014-10-21 23:00:20 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp IR: MDNode => Value: Instruction::getMetadata() 2014-11-01 00:10:31 +00:00
ValueTracking.cpp Indentation fixes 2014-11-06 19:05:57 +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))

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