llvm-6502/lib/Analysis
Chad Rosier dce42b75dc Probably not a good idea to convert a single vector load into a memcpy. We
don't do this now, but add a test case to prevent this from happening in the
future.
Additional test for rdar://9892684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-06 00:19:08 +00:00
..
IPA build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp
Analysis.cpp
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
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 build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
ConstantFolding.cpp Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00
DbgInfoPrinter.cpp
DebugInfo.cpp
DIBuilder.cpp Fix typo in comment. 2011-11-09 22:45:04 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
InlineCost.cpp
InstCount.cpp
InstructionSimplify.cpp Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
LazyValueInfo.cpp Clear the new cache. 2011-12-03 15:19:55 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Fix a few more places where TargetData/TargetLibraryInfo is not being passed. 2011-12-02 01:26:24 +00:00
LLVMBuild.txt build: Add initial cut at LLVMBuild.txt files. 2011-11-03 18:53:17 +00:00
Loads.cpp
LoopDependenceAnalysis.cpp
LoopInfo.cpp Remove the temporary flag -disable-unroll-scev and dead code. 2011-11-28 19:22:09 +00:00
LoopPass.cpp
Makefile
MemDepPrinter.cpp
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
NoAliasAnalysis.cpp
PathNumbering.cpp
PathProfileInfo.cpp
PathProfileVerifier.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
PHITransAddr.cpp Propagate TargetLibraryInfo throughout ConstantFolding.cpp and 2011-12-01 03:08:23 +00:00
PostDominators.cpp
ProfileEstimatorPass.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
ProfileInfo.cpp
ProfileInfoLoader.cpp
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
RegionInfo.cpp Missed some users of Value::getNameStr. 2011-11-15 18:30:06 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Fix a few more places where TargetData/TargetLibraryInfo is not being passed. 2011-12-02 01:26:24 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp LSR: handle the expansion of phi operands that use postinc forms of the IV. 2011-11-30 06:07:54 +00:00
ScalarEvolutionNormalization.cpp
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
ValueTracking.cpp Probably not a good idea to convert a single vector load into a memcpy. We 2011-12-06 00:19:08 +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))

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