llvm-6502/lib/Analysis
Dan Gohman 082d6b6536 Minor code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:32:11 +00:00
..
IPA Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
AliasAnalysis.cpp Remove interprocedural-basic-aa and associated code. The AliasAnalysis 2010-07-07 14:27:09 +00:00
AliasAnalysisCounter.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
AliasAnalysisEvaluator.cpp Remove interprocedural-basic-aa and associated code. The AliasAnalysis 2010-07-07 14:27:09 +00:00
AliasDebugger.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
AliasSetTracker.cpp
Analysis.cpp
BasicAliasAnalysis.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
CaptureTracking.cpp
CFGPrinter.cpp
CMakeLists.txt
ConstantFolding.cpp eliminate CallInst::ArgOffset 2010-07-16 09:38:02 +00:00
DbgInfoPrinter.cpp
DebugInfo.cpp Correct line info for declarations/definitions. Radar 8063111. 2010-07-19 23:56:30 +00:00
DomPrinter.cpp Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
InlineCost.cpp
InstCount.cpp
InstructionSimplify.cpp Fix PR7647, handling the case when 'To' ends up being 2010-07-15 06:36:08 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
LazyValueInfo.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Add a lint check for mismatched return types, inspired by PR6944. 2010-07-12 18:02:04 +00:00
LiveValues.cpp
Loads.cpp
LoopDependenceAnalysis.cpp
LoopInfo.cpp cache result of operator* 2010-07-09 14:28:41 +00:00
LoopPass.cpp
Makefile
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp use the new isFreeCall API and ArgOperand accessors 2010-06-23 22:48:06 +00:00
ModuleDebugInfoPrinter.cpp
PHITransAddr.cpp
PointerTracking.cpp
PostDominators.cpp cache result of operator* 2010-07-09 15:52:36 +00:00
ProfileEstimatorPass.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
ProfileInfo.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
ProfileVerifierPass.cpp
README.txt
ScalarEvolution.cpp Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef. 2010-07-15 20:02:11 +00:00
ScalarEvolutionAliasAnalysis.cpp Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch 2010-07-20 08:26:15 +00:00
ScalarEvolutionExpander.cpp Fix the order that SCEVExpander considers add operands in so that 2010-07-15 23:38:13 +00:00
ScalarEvolutionNormalization.cpp Minor code cleanups. 2010-07-20 16:32:11 +00:00
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp use ArgOperand accessors 2010-06-23 23:38:07 +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))

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