1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/include/llvm/Analysis
Chandler Carruth 9056498e66 [PM] Redesign how the new PM detects whether an analysis result provides
its own invalidate method.

Previously, the technique would assume that if a result didn't have an
invalidate method that didn't exactly match the expected signature it
didn't have one at all. This is in fact not the case. And we had
analyses with incorrect signatures for the invalidate method in the
tree that would be erroneously invalidated in certain cases! Yikes.

Moreover a result might legitimately want to have multiple overloads for
the invalidate method, and if one changes or a new one is needed we
again really want a compiler error. For example in the tree we had not
added the overload for a *function* IR unit to the invalidate routine
for TLI. Doh.

So a new techique for the SFINAE detection here: if the result has *any*
member spelled "invalidate" we turn off the synthesis of a default
version. We don't care if it is a member function or a member variable
or how many overloads there are. Once a result has something by that
name it must provide suitable overloads for the contexts in which it is
used. This seems much more resilient and durable.

Huge props to Richard Smith who helped me figure out how on earth we
could even do this in C++. It took quite some doing. The technique is
remarkably clean however, and merely requires that the analysis results
are not *final* classes. I think that's a requirement we can live with
even if it is a bit odd.

I've fixed the two bad in-tree analysis results. And this will make my
next change which changes the API for invalidate much easier to
validate as correct.

llvm-svn: 279217
2016-08-19 07:49:23 +00:00
..
AliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
AliasAnalysisEvaluator.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
AliasSetTracker.h [AliasSetTracker] Delete dead code 2016-08-11 17:20:20 +00:00
AssumptionCache.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
BasicAliasAnalysis.h [BasicAA] Avoid calling GetUnderlyingObject, when the result of a previous call can be reused. 2016-08-12 16:05:03 +00:00
BlockFrequencyInfo.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
BlockFrequencyInfoImpl.h [Analysis] Change several Analysis pieces to use NodeRef. NFC. 2016-08-18 21:41:24 +00:00
BranchProbabilityInfo.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
CallGraph.h Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
CallGraphSCCPass.h [CallGraphSCCPass] Use an ArrayRef instead of a pair of iterators 2016-08-06 06:21:02 +00:00
CallPrinter.h [CG] Rename the DOT printing pass to actually reference "DOT". 2016-03-10 11:04:40 +00:00
CaptureTracking.h
CFG.h
CFGPrinter.h
CFLAndersAliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
CFLSteensAliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
CGSCCPassManager.h [PM] Improve the debugging and logging facilities of the CGSCC bits of 2016-06-27 23:26:08 +00:00
CodeMetrics.h Pass EphValues by const-ref as it is not modified in the callee 2016-08-03 19:13:50 +00:00
ConstantFolding.h [ConstantFolding] Remove an unused ConstantFoldInstOperands overload 2016-07-29 03:27:33 +00:00
DemandedBits.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
DependenceAnalysis.h [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
DivergenceAnalysis.h
DominanceFrontier.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
DominanceFrontierImpl.h
DomPrinter.h
DOTGraphTraitsPass.h
EHPersonalities.h X86: permit using SjLj EH on x86 targets as an option 2016-05-31 01:48:07 +00:00
GlobalsModRef.h Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
IndirectCallPromotionAnalysis.h Refactor indirect call promotion profitability analysis (NFC) 2016-07-12 21:13:44 +00:00
IndirectCallSiteVisitor.h Refactor indirect call promotion profitability analysis (NFC) 2016-07-12 21:13:44 +00:00
InlineCost.h Make more fields of InlineParams Optional. 2016-08-11 03:58:05 +00:00
InstructionSimplify.h [InstSimplify] Cast folding can be made more generic 2016-07-26 17:58:05 +00:00
Interval.h Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
IntervalIterator.h
IntervalPartition.h
IteratedDominanceFrontier.h Correct IDF calculator for ReverseIDF 2016-04-19 06:13:28 +00:00
IVUsers.h ADT: Share code for embedded sentinel traits, NFC 2016-08-12 15:00:55 +00:00
LazyBlockFrequencyInfo.h [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyBranchProbabilityInfo.h [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyCallGraph.h [LCG] Hoist the definitions of the stream operator friends to be inline 2016-07-07 07:52:07 +00:00
LazyValueInfo.h [PM] Port LVI to the new PM. 2016-06-13 22:01:25 +00:00
Lint.h
Loads.h Fix Wdocumentation unknown parameter warning 2016-08-08 11:49:24 +00:00
LoopAccessAnalysis.h Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopInfo.h [ADT] Migrate DepthFirstIterator to use NodeRef 2016-08-11 22:36:16 +00:00
LoopInfoImpl.h [Analysis] Change several Analysis pieces to use NodeRef. NFC. 2016-08-18 21:41:24 +00:00
LoopIterator.h [LV] Move LoopBodyTraits to a better place, and add comment for simplifying LoopBlocksTraversal. NFC. 2016-08-17 22:20:07 +00:00
LoopPass.h Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
LoopPassManager.h PM: Check that loop passes preserve a basic set of analyses 2016-05-03 21:35:08 +00:00
LoopUnrollAnalyzer.h Revert "Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."" 2016-05-13 21:23:25 +00:00
MemoryBuiltins.h Calculate __builtin_object_size when pointer depends on a condition 2016-04-13 12:25:25 +00:00
MemoryDependenceAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
MemoryLocation.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ModuleSummaryAnalysis.h [PM] Rework the new PM support for building the ModuleSummaryIndex to 2016-08-19 07:49:19 +00:00
ObjCARCAliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ObjCARCAnalysisUtils.h Add support for objc_unsafeClaimAutoreleasedReturnValue to the 2016-01-27 19:05:08 +00:00
ObjCARCInstKind.h Add support for objc_unsafeClaimAutoreleasedReturnValue to the 2016-01-27 19:05:08 +00:00
OptimizationDiagnosticInfo.h [OptDiag] Add class Doxygen comment 2016-08-10 00:44:56 +00:00
OrderedBasicBlock.h
Passes.h [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
PHITransAddr.h
PostDominators.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ProfileSummaryInfo.h Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
PtrUseVisitor.h
RegionInfo.h [ADT] Fix DepthFirstIterator's std::iterator base to have normal typedefs 2016-08-15 22:07:30 +00:00
RegionInfoImpl.h Fix the build for libstdc++ 4.7 2016-07-27 18:25:12 +00:00
RegionIterator.h [Analysis] Change several Analysis pieces to use NodeRef. NFC. 2016-08-18 21:41:24 +00:00
RegionPass.h
RegionPrinter.h
ScalarEvolution.h Revert "Enhance SCEV to compute the trip count for some loops with unknown stride." 2016-08-16 21:02:04 +00:00
ScalarEvolutionAliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ScalarEvolutionExpander.h [SCEV] Update interface to handle SCEVExpander insert point motion. 2016-08-11 21:05:17 +00:00
ScalarEvolutionExpressions.h [SCEV] Don't unnecessarily namespace; NFC 2016-06-23 18:03:32 +00:00
ScalarEvolutionNormalization.h
ScopedNoAliasAA.h [ScopedNoAliasAA] collectMDInDomain should be a free function 2016-08-15 03:56:06 +00:00
SparsePropagation.h
TargetFolder.h [ConstnatFolding] Teach the folder how to fold ConstantVector 2016-07-29 03:27:26 +00:00
TargetLibraryInfo.def Recommitting r275284: add support to inline __builtin_mempcpy 2016-07-29 18:23:18 +00:00
TargetLibraryInfo.h [PM] Redesign how the new PM detects whether an analysis result provides 2016-08-19 07:49:23 +00:00
TargetTransformInfo.h [LoopStrenghtReduce] Refactoring and addition of a new target cost function. 2016-08-17 13:24:19 +00:00
TargetTransformInfoImpl.h [LoopStrenghtReduce] Refactoring and addition of a new target cost function. 2016-08-17 13:24:19 +00:00
Trace.h
TypeBasedAliasAnalysis.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
TypeMetadataUtils.h IR: Introduce llvm.type.checked.load intrinsic. 2016-06-25 00:23:04 +00:00
ValueTracking.h Constify ValueTracking. NFC. 2016-08-13 01:05:32 +00:00
VectorUtils.h SLPVectorizer: Move propagateMetadata to VectorUtils 2016-06-30 21:17:59 +00:00