1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/Analysis
Adam Nemet 6a1c0c8759 [LAA, LV] Port to new streaming interface for opt remarks. Update LV
OptimizationRemarkAnalysis directly takes the role of the report that is
generated by LAA.

Then we need the magic to be able to turn an LAA remark into an LV
remark.  This is done via a new OptimizationRemark ctor.

llvm-svn: 282758
2016-09-29 20:12:18 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp Update a comment. 2016-08-25 01:29:55 +00:00
AliasAnalysisSummary.h Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
AliasSetTracker.cpp
Analysis.cpp [PM] Port CFGViewer and CFGPrinter to the new Pass Manager 2016-09-15 18:35:27 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp
BlockFrequencyInfo.cpp s/static inline/static/ for headers I have changed in r279475. NFC. 2016-08-31 16:48:13 +00:00
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp Enhance calcColdCallHeuristics for InvokeInst 2016-09-23 17:26:14 +00:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp [PM] Port CFGViewer and CFGPrinter to the new Pass Manager 2016-09-15 18:35:27 +00:00
CFLAndersAliasAnalysis.cpp Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp Fixup r279618, instantiate *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID. 2016-08-30 15:47:13 +00:00
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp [ConstantFold] Improve the bitcast folding logic for constant vectors. 2016-09-13 14:50:47 +00:00
CostModel.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp Fix a thinko in r278189. 2016-08-29 20:45:51 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] allow or-of-icmps folds with vector splat constants 2016-09-28 14:27:21 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp [LCG] Redesign the lazy post-order iteration mechanism for the 2016-09-16 10:20:17 +00:00
LazyValueInfo.cpp Add some shortcuts in LazyValueInfo to reduce compile time of Correlated Value Propagation. 2016-09-15 06:28:34 +00:00
Lint.cpp
LLVMBuild.txt
Loads.cpp [Loads] Properly populate the visited set in isDereferenceableAndAlignedPointer 2016-08-31 03:22:32 +00:00
LoopAccessAnalysis.cpp [LAA, LV] Port to new streaming interface for opt remarks. Update LV 2016-09-29 20:12:18 +00:00
LoopInfo.cpp [LoopInfo] Add verification by recomputation. 2016-08-31 19:26:19 +00:00
LoopPass.cpp
LoopPassManager.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
MemoryDependenceAnalysis.cpp Do not widen load for different variable in GVN. 2016-09-09 18:42:35 +00:00
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp Refactor the ProfileSummaryInfo to use doInitialization and doFinalization to handle Module update. 2016-09-28 21:00:58 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationDiagnosticInfo.cpp [Inliner] Port all opt remarks to new streaming API 2016-09-27 23:47:03 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp Refactor the ProfileSummaryInfo to use doInitialization and doFinalization to handle Module update. 2016-09-28 21:00:58 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Use a SmallPtrSet as a temporary union predicate; NFC 2016-09-28 17:14:58 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Create a getelementptr instead of sub expr for ValueOffsetPair if the 2016-09-14 04:39:50 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h
TargetLibraryInfo.cpp [TLI] isdigit / isascii / toascii param type should match return type (PR30484) 2016-09-23 18:44:09 +00:00
TargetTransformInfo.cpp
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueTracking.cpp Don't look through addrspacecast in GetPointerBaseWithConstantOffset 2016-09-28 17:57:16 +00:00
VectorUtils.cpp Add handling of !invariant.load to PropagateMetadata. 2016-09-11 01:39: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))

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