1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/Analysis
Igor Laevsky c47518fc50 [BasicAliasAnalysis] Do not check ModRef table for intrinsics
All possible ModRef behaviours can be completely represented using existing LLVM IR attributes.

Differential Revision: http://reviews.llvm.org/D12033

llvm-svn: 245224
2015-08-17 15:56:56 +00:00
..
IPA [GMR] isNonEscapingGlobalNoAlias() should look through Bitcasts/GEPs when looking at loads. 2015-08-17 10:06:08 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp [PM/AA] Sink all the actual code from AliasAnalysisCounter back into the 2015-08-14 02:12:12 +00:00
AliasAnalysisEvaluator.cpp
AliasSetTracker.cpp
Analysis.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp [BasicAliasAnalysis] Do not check ModRef table for intrinsics 2015-08-17 15:56:56 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp
CaptureTracking.cpp [IR] Give catchret an optional 'return value' operand 2015-08-15 02:46:08 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAliasAnalysis.cpp [PM/AA] Hoist the value handle definition for CFLAA into the header to 2015-08-14 02:50:34 +00:00
CGSCCPassManager.cpp
CMakeLists.txt [PM/AA] Delete the LibCallAliasAnalysis and all the associated 2015-08-15 09:22:21 +00:00
CodeMetrics.cpp [IR] Add token types 2015-08-14 05:09:07 +00:00
ConstantFolding.cpp
CostModel.cpp
Delinearization.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
DemandedBits.cpp Separate out BDCE's analysis into a separate DemandedBits analysis. 2015-08-14 11:09:09 +00:00
DependenceAnalysis.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
InstCount.cpp
InstructionSimplify.cpp [IR] Give catchret an optional 'return value' operand 2015-08-15 02:46:08 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
LazyCallGraph.cpp
LazyValueInfo.cpp
LibCallSemantics.cpp [PM/AA] Delete the LibCallAliasAnalysis and all the associated 2015-08-15 09:22:21 +00:00
Lint.cpp
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
LoopInfo.cpp [IR] Add token types 2015-08-14 05:09:07 +00:00
LoopPass.cpp
Makefile
MemDepPrinter.cpp
MemDerefPrinter.cpp Take alignment into account in isSafeToSpeculativelyExecute and isSafeToLoadUnconditionally. 2015-08-17 15:54:26 +00:00
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp [PM/AA] Add missing static dependency edges from DSE and memdep to TLI. 2015-08-12 18:10:45 +00:00
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
NoAliasAnalysis.cpp
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
ScalarEvolutionAliasAnalysis.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
ScalarEvolutionExpander.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp [PM/AA] Hoist ScopedNoAliasAA's interface into a header and move the 2015-08-14 02:55:50 +00:00
SparsePropagation.cpp
StratifiedSets.h
TargetLibraryInfo.cpp
TargetTransformInfo.cpp
Trace.cpp
TypeBasedAliasAnalysis.cpp [PM/AA] Hoist the interface to TBAA into a dedicated header along with 2015-08-14 03:33:48 +00:00
ValueTracking.cpp Take alignment into account in isSafeToSpeculativelyExecute and isSafeToLoadUnconditionally. 2015-08-17 15:54:26 +00:00
VectorUtils.cpp

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))

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