llvm-6502/lib/Analysis
Chandler Carruth d04a8d4b33 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 16:50:05 +00:00
..
IPA Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
AliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
AliasAnalysisCounter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
AliasAnalysisEvaluator.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
AliasDebugger.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
AliasSetTracker.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
Analysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
BasicAliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
BlockFrequencyInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
BranchProbabilityInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
CaptureTracking.cpp Give CaptureTracker::shouldExplore a base implementation. Most users want to do 2012-10-08 22:12:48 +00:00
CFGPrinter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
CMakeLists.txt Add a cost model analysis that allows us to estimate the cost of IR-level instructions. 2012-11-02 21:48:17 +00:00
CodeMetrics.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ConstantFolding.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
CostModel.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
DbgInfoPrinter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
DependenceAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
DominanceFrontier.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
DomPrinter.cpp
InlineCost.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCount.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstructionSimplify.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
Interval.cpp Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00
IntervalPartition.cpp
IVUsers.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LazyValueInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LibCallAliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LibCallSemantics.cpp
Lint.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LLVMBuild.txt
Loads.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LoopInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LoopPass.cpp Enable the new LoopInfo algorithm by default. 2012-06-26 04:11:38 +00:00
Makefile
MemDepPrinter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
MemoryBuiltins.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
MemoryDependenceAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ModuleDebugInfoPrinter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
NoAliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
PathNumbering.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
PathProfileInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
PathProfileVerifier.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
PHITransAddr.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
PostDominators.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileDataLoader.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileDataLoaderPass.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileEstimatorPass.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileInfoLoader.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileInfoLoaderPass.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ProfileVerifierPass.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
README.txt
RegionInfo.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
RegionPass.cpp Remove the the block_node_iterator of Region, replace it by the block_iterator. 2012-08-27 13:49:24 +00:00
RegionPrinter.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ScalarEvolution.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ScalarEvolutionAliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ScalarEvolutionExpander.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ScalarEvolutionNormalization.cpp
SparsePropagation.cpp
Trace.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
TypeBasedAliasAnalysis.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
ValueTracking.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +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))

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