YouCompleteMe/cpp/llvm/lib/Analysis
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00
..
IPA Adding more llvm/clang files 2012-07-05 17:55:45 -07:00
AliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
AliasAnalysisCounter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
AliasAnalysisEvaluator.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
AliasDebugger.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
AliasSetTracker.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Analysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
BasicAliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
BlockFrequencyInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
BranchProbabilityInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
CaptureTracking.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
CFGPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
CMakeLists.txt Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
CodeMetrics.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ConstantFolding.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
DbgInfoPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
DebugInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
DIBuilder.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
DominanceFrontier.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
DomPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
InlineCost.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
InstCount.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
InstructionSimplify.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Interval.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
IntervalPartition.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
IVUsers.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LazyValueInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LibCallAliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LibCallSemantics.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Lint.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LLVMBuild.txt Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Loads.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LoopDependenceAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LoopInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
LoopPass.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Makefile Adding more llvm/clang files 2012-07-05 17:55:45 -07:00
MemDepPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
MemoryBuiltins.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
MemoryDependenceAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ModuleDebugInfoPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
NoAliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
PathNumbering.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
PathProfileInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
PathProfileVerifier.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
PHITransAddr.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
PostDominators.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ProfileEstimatorPass.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ProfileInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ProfileInfoLoader.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ProfileInfoLoaderPass.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ProfileVerifierPass.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
README.txt Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
RegionInfo.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
RegionPass.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
RegionPrinter.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ScalarEvolution.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ScalarEvolutionAliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ScalarEvolutionExpander.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ScalarEvolutionNormalization.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
SparsePropagation.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Trace.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
TypeBasedAliasAnalysis.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
ValueTracking.cpp Adding llvm and clang in-source 2012-07-05 17:51:06 -07: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))

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