llvm-6502/lib/Analysis
Chandler Carruth 417c5c172c [PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.

This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.

The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 10:01:29 +00:00
..
IPA Fix a crash in the assumption cache when inlining indirect function calls 2015-02-12 21:04:22 +00:00
AliasAnalysis.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp AliasSet: Simplify mergeSetIn 2014-11-19 19:36:18 +00:00
Analysis.cpp Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
AssumptionCache.cpp [PM] Actually add the new pass manager support for the assumption cache. 2015-01-22 21:53:09 +00:00
BasicAliasAnalysis.cpp [BasicAA] Try to disambiguate GEPs through arrays of structs into 2015-02-07 17:04:29 +00:00
BlockFrequencyInfo.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
BlockFrequencyInfoImpl.cpp BFI: Saturate when combining edges to a successor 2014-12-05 19:13:42 +00:00
BranchProbabilityInfo.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
CaptureTracking.cpp [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
CFG.cpp Standardize {pred,succ,use,user}_empty() 2015-01-13 03:46:47 +00:00
CFGPrinter.cpp
CFLAliasAnalysis.cpp Fixed a bug where CFLAA would crash the compiler. 2015-02-12 03:07:07 +00:00
CGSCCPassManager.cpp [PM] Remove the defunt CGSCC-specific debug flag. 2015-01-13 22:45:13 +00:00
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
CodeMetrics.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
ConstantFolding.cpp [PM] Move TargetLibraryInfo into the Analysis library. 2015-01-15 02:16:27 +00:00
CostModel.cpp [multiversion] Thread a function argument through all the callers of the 2015-02-01 12:01:35 +00:00
Delinearization.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
DependenceAnalysis.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
InstCount.cpp
InstructionSimplify.cpp InstCombine: cleanup redundant dyn_cast<> (NFC) 2015-02-13 07:38:04 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
JumpInstrTableInfo.cpp Add Forward Control-Flow Integrity. 2014-11-11 21:08:02 +00:00
LazyCallGraph.cpp Revert r225854: [PM] Move the LazyCallGraph printing functionality to 2015-01-14 00:27:45 +00:00
LazyValueInfo.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
Lint.cpp [PM] Remove the old 'PassManager.h' header file at the top level of 2015-02-13 10:01:29 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Loads.cpp Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite 2014-11-25 08:20:27 +00:00
LoopAccessAnalysis.cpp [LV] Move addRuntimeCheck to LoopAccessAnalysis 2015-02-06 18:31:04 +00:00
LoopInfo.cpp [PM] Port LoopInfo to the new pass manager, adding both a LoopAnalysis 2015-01-20 10:58:50 +00:00
LoopPass.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
Makefile
MemDepPrinter.cpp MemDepPrinter: cleanup a few loops (NFC) 2015-02-09 19:49:54 +00:00
MemDerefPrinter.cpp MemDerefPrinter: Require DataLayoutPass for higher accuracy 2015-02-09 21:50:03 +00:00
MemoryBuiltins.cpp [PM] Move TargetLibraryInfo into the Analysis library. 2015-01-15 02:16:27 +00:00
MemoryDependenceAnalysis.cpp Whitespace. 2015-02-06 14:14:41 +00:00
ModuleDebugInfoPrinter.cpp
NoAliasAnalysis.cpp Simplify code. No functionality change. 2014-10-05 12:21:57 +00:00
PHITransAddr.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
PostDominators.cpp
PtrUseVisitor.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
README.txt
RegionInfo.cpp [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
RegionPass.cpp [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
RegionPrinter.cpp
ScalarEvolution.cpp Bugfix: SCEV incorrectly marks certain add recurrences as nsw 2015-02-09 18:34:55 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
ScalarEvolutionNormalization.cpp Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
ScopedNoAliasAA.cpp [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
SparsePropagation.cpp
StratifiedSets.h Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
TargetLibraryInfo.cpp [PM] Rework how the TargetLibraryInfo pass integrates with the new pass 2015-01-24 02:06:09 +00:00
TargetTransformInfo.cpp Value soft float calls as more expensive in the inliner. 2015-02-05 02:09:33 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Correctly combine alias.scope metadata by a union instead of intersecting 2015-02-08 17:07:14 +00:00
ValueTracking.cpp ValueTracking: Make isBytewiseValue simpler and more powerful at the same time. 2015-02-07 19:29:02 +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))

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