1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Analysis
Chandler Carruth c777bdad5b [LCG] Completely remove the parent set and leaf tracking for RefSCCs.
After the previous series of patches, this is now trivial and deletes
a pretty astonishing amount of complexity. This has been a long time
coming, as the move toward a PO sequence of RefSCCs started eroding the
underlying use cases for this half of the data structure.

Among the biggest advantages here is that now there aren't two
independent data structures that need to stay in sync.

Some of my profiling has also indicated that updating the parent sets
was among the most expensive parts of the lazy call graph. Eliminating
it whole sale is likely to be a nice win in terms of compile time.

Last but not least, I had discussed with some folks previously keeping
it around for asserts and other correctness checking, but once the
fundamentals of the parent and child checking were implemented without
the parent sets their value in correctness checking was tiny and no
where near worth the cost of the complexity required to keep everything
up-to-date.

llvm-svn: 310171
2017-08-05 07:37:00 +00:00
..
AliasAnalysis.cpp [IR] Make paramHasAttr to use arg indices instead of attr indices 2017-04-14 20:19:02 +00:00
AliasAnalysisEvaluator.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
Analysis.cpp MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
AssumptionCache.cpp [IR][AssumptionCache] Add m_Shift and m_BitwiseLogic matchers to replace a couple m_CombineOr 2017-06-24 06:27:14 +00:00
BasicAliasAnalysis.cpp Whitespace. 2017-07-11 02:31:54 +00:00
BlockFrequencyInfo.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BlockFrequencyInfoImpl.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BranchProbabilityInfo.cpp [ConstantInt] Use ConstantInt::getValue instead of Constant::getUniqueInteger in a few places where we obviously have a ConstantInt. NFC 2017-08-04 16:59:29 +00:00
CallGraph.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
CallGraphSCCPass.cpp Address http://bugs.llvm.org/pr32207 by making BannerPrinted local to runOnSCC and skipping banner for function declarations. 2017-06-12 02:18:50 +00:00
CallPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CaptureTracking.cpp fix trivial typos; NFC 2017-07-09 05:54:44 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp [CFLAA] Move a common function to the header to reduce duplication. 2017-06-27 02:25:06 +00:00
CFLGraph.h [CFLAA] Remove unused include. NFCI. 2017-06-06 23:16:19 +00:00
CFLSteensAliasAnalysis.cpp [CFLAA] Remove unneded function declaration. NFCI. 2017-06-29 22:57:37 +00:00
CGSCCPassManager.cpp [PM] Add a comment clarifying what a particular predicate is doing. 2017-08-01 06:40:11 +00:00
CMakeLists.txt MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
CodeMetrics.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ConstantFolding.cpp [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin 2017-06-09 23:18:11 +00:00
CostModel.cpp [SLP] Initial rework for min/max horizontal reduction vectorization, NFC. 2017-07-31 14:36:05 +00:00
Delinearization.cpp
DemandedBits.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
DependenceAnalysis.cpp fix typos in comments and error messages; NFC 2017-07-10 12:44:25 +00:00
DivergenceAnalysis.cpp DivergencyAnalysis patch for review 2017-06-15 19:33:10 +00:00
DominanceFrontier.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
DomPrinter.cpp [DomPrinter] Add a way to programmatically dump a dot representation. 2017-04-24 17:48:44 +00:00
EHPersonalities.cpp [EH] Recognize __(gxx|gcc)_personality_seh0 as the GNU EH personalities 2017-05-31 22:35:52 +00:00
GlobalsModRef.cpp GlobalsModRef: Ensure optnone+readonly/readnone attributes are respected 2017-06-07 21:37:39 +00:00
IndirectCallPromotionAnalysis.cpp Changing the default MaxNumPromotions from 2 to 3. 2017-07-28 01:03:10 +00:00
InlineCost.cpp [Inliner] Fix a typo in option description. NFC. 2017-08-04 17:15:17 +00:00
InstCount.cpp [Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back other Statistic variables 2017-07-18 02:41:12 +00:00
InstructionSimplify.cpp [InstSimplify] Use commutable matchers to simplify some code. NFC 2017-07-16 06:57:41 +00:00
Interval.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IntervalPartition.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IteratedDominanceFrontier.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
IVUsers.cpp [IVUsers] Don't bail out of normalizing non-affine add recs 2017-04-25 06:53:25 +00:00
LazyBlockFrequencyInfo.cpp [LazyBFI] Fix typos 2017-02-14 17:21:12 +00:00
LazyBranchProbabilityInfo.cpp [BPI] Don't assume that strcmp returning >0 is more likely than <0 2017-06-08 09:44:40 +00:00
LazyCallGraph.cpp [LCG] Completely remove the parent set and leaf tracking for RefSCCs. 2017-08-05 07:37:00 +00:00
LazyValueInfo.cpp [ConstantInt] Use ConstantInt::getValue instead of Constant::getUniqueInteger in a few places where we obviously have a ConstantInt. NFC 2017-08-04 16:59:29 +00:00
Lint.cpp [Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI 2017-07-06 18:39:47 +00:00
LLVMBuild.txt Update libdeps to add BinaryFormat, introduced in r304864. 2017-06-07 04:48:49 +00:00
Loads.cpp Make visible isDereferenceableAndAlignedPointer(..., const APInt &Size, ...) 2017-06-24 01:35:13 +00:00
LoopAccessAnalysis.cpp [LAA] Correctly return a half-open range in expandBounds 2017-04-05 09:24:26 +00:00
LoopAnalysisManager.cpp Revert r293017 and fix the actual underlying issue. 2017-02-07 01:50:48 +00:00
LoopInfo.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
LoopPass.cpp [LegacyPM] Make the 'addLoop' method accept a loop to add rather than 2017-05-25 03:01:31 +00:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MemDerefPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MemoryBuiltins.cpp [MemoryBuiltins] Allow truncation in visitAllocaInst() 2017-07-12 06:19:10 +00:00
MemoryDependenceAnalysis.cpp [MemDep] Cleanup return after else & use auto. NFC. 2017-06-25 22:12:59 +00:00
MemoryLocation.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
MemorySSA.cpp Allow None as a MemoryLocation to getModRefInfo 2017-08-01 00:28:29 +00:00
MemorySSAUpdater.cpp [mssa] Fix case when there is no definition in a block prior to an inserted use. 2017-06-07 16:46:53 +00:00
ModuleDebugInfoPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ModuleSummaryAnalysis.cpp [ThinLTO] Add FunctionAttrs to ThinLTO index 2017-08-04 16:00:58 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
OptimizationDiagnosticInfo.cpp [ORE] Add diagnostics hotness threshold 2017-06-30 23:14:53 +00:00
OrderedBasicBlock.cpp [OrderedBasicBlock] Return false for comesBefore(A, A) 2017-06-02 13:10:31 +00:00
PHITransAddr.cpp PHITransAddr: Use new SimplifyQuery based API. 2017-04-26 20:56:13 +00:00
PostDominators.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
ProfileSummaryInfo.cpp Adjust the hotness threshold from 99.9% to 99%. 2017-08-04 16:20:54 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-27 21:52:05 +00:00
RegionPass.cpp Add opt-bisect support for region passes. 2017-06-01 21:22:26 +00:00
RegionPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ScalarEvolution.cpp [SCEV] Preserve NSW information for sext(subtract). 2017-08-04 20:19:46 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp [SCEV] Teach SCEVExpander to expand BinPow 2017-06-19 06:24:53 +00:00
ScalarEvolutionNormalization.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ScopedNoAliasAA.cpp
SparsePropagation.cpp [IR] Redesign the case iterator in SwitchInst to actually be an iterator 2017-04-12 07:27:28 +00:00
StratifiedSets.h
TargetLibraryInfo.cpp Revert "Add pthread_self function prototype and make it speculatable." 2017-05-21 00:37:55 +00:00
TargetTransformInfo.cpp [Cost] Rename getReductionCost() to getArithmeticReductionCost(), NFC. 2017-07-31 14:19:32 +00:00
Trace.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
TypeBasedAliasAnalysis.cpp [TBAA] Remove metadata keyword from IR examples in comments (NFC). 2017-06-29 13:55:23 +00:00
TypeMetadataUtils.cpp Analysis: Add appropriate const qualification to functions in TypeMetadataUtils.cpp. NFC. 2017-01-27 22:55:30 +00:00
ValueTracking.cpp [InstCombine] Canonicalize clamp of float types to minmax in fast mode. 2017-08-04 12:22:17 +00:00
VectorUtils.cpp [Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI 2017-07-06 18:39:47 +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))

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