|
Jlm
|
#include <AliasAnalysisPrecisionEvaluator.hpp>

Classes | |
| struct | AggregatedClobberInfos |
| struct | Context |
| struct | PrecisionInfo |
| class | PrecisionStatistics |
Public Member Functions | |
| AliasAnalysisPrecisionEvaluator () | |
| ~AliasAnalysisPrecisionEvaluator () noexcept | |
| void | SetLoadsConsideredClobbers (bool loadsConsideredClobbers) noexcept |
| bool | AreLoadsConsideredClobbers () const noexcept |
| void | SetDeduplicatePointers (bool deduplicatePointers) noexcept |
| bool | IsDeduplicatingPointers () const noexcept |
| void | SetAliasingGraphEnabled (bool aliasingGraphEnabled) noexcept |
| bool | IsAliasingGraphEnabled () const noexcept |
| void | SetPerFunctionOutputEnabled (bool perFunctionOutputEnabled) noexcept |
| bool | IsPerFunctionOutputEnabled () const noexcept |
| void | EvaluateAliasAnalysisClient (const rvsdg::RvsdgModule &rvsdgModule, AliasAnalysis &aliasAnalysis, util::StatisticsCollector &statisticsCollector) |
Private Member Functions | |
| void | EvaluateAllFunctions (const rvsdg::Region ®ion, AliasAnalysis &aliasAnalysis) |
| void | EvaluateFunction (const rvsdg::LambdaNode &function, AliasAnalysis &aliasAnalysis) |
| void | CollectPointersFromRegion (const rvsdg::Region ®ion) |
| void | CollectPointersFromSimpleNode (const rvsdg::SimpleNode &node) |
| void | CollectPointersFromStructuralNode (const rvsdg::StructuralNode &node) |
| void | CollectPointer (const rvsdg::Output *value, size_t size, bool isClobber) |
| void | NormalizePointerValues () |
| void | AggregateDuplicates () |
| void | CalculateResults (std::optional< util::FilePath > perFunctionOutput, PrecisionStatistics &statistics) const |
| void | AddToAliasingGraph (const rvsdg::Output &p1, size_t s1, const rvsdg::Output &p2, size_t s2, AliasAnalysis::AliasQueryResponse response) |
Static Private Member Functions | |
| static AggregatedClobberInfos | AggregateClobberInfos (const std::vector< PrecisionInfo::ClobberInfo > &clobberInfos) |
| static void | PrintAggregatedClobberInfos (const AggregatedClobberInfos &clobberInfos, std::ostream &out) |
Private Attributes | |
| bool | LoadsConsideredClobbers_ = false |
| bool | DeduplicatePointers_ = false |
| bool | AliasingGraphEnabled_ = false |
| bool | PerFunctionOutputEnabled_ = false |
| Context | Context_ |
Class for evaluating the precision of a PointsToGraph on an RVSDG module. Uses a pairwise alias analysis to ask MayAlias queries on relevant pairs of pointers. Only considers load and store operations, and not function calls.
Definition at line 30 of file AliasAnalysisPrecisionEvaluator.hpp.
|
default |
|
defaultnoexcept |
|
private |
Creates nodes corresponding to operations on p1 and p2 in the aliasing graph, and adds an edge between them based on the alias response.
| p1 | the first pointer |
| s1 | the size of the operation at the first pointer |
| p2 | the second pointer |
| s2 | the size of the operation at the second pointer |
| response | the result of performing an alias query on the operation pair |
Definition at line 359 of file AliasAnalysisPrecisionEvaluator.cpp.
|
staticprivate |
Adds up a list of ClobberInfo structs, where each element represents N clobber operations Returns results for the average clobber, as well as total alias query response counts
Definition at line 402 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Removes repeated instances of the same (pointer, size) pair in the current context. If IsDeduplicatingPointers() is true, duplicate instances are discarded. Otherwise, the duplicated instances are added up and given a multiplier.
Definition at line 327 of file AliasAnalysisPrecisionEvaluator.cpp.
|
inlinenoexcept |
Definition at line 54 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Called once all functions have been evaluated, to calculate and print averages. Adds up both the total number of responses, and calculates average response rates per clobber.
| perFunctionOutput | if given, statistics about each function are written to the file |
| statistics | the statistics instance where the final module-level statistics are written |
Definition at line 463 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Adds the given pointer + size to the list of operations in the function being evaluated
Definition at line 307 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Definition at line 256 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Definition at line 276 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Definition at line 297 of file AliasAnalysisPrecisionEvaluator.cpp.
| void jlm::llvm::aa::AliasAnalysisPrecisionEvaluator::EvaluateAliasAnalysisClient | ( | const rvsdg::RvsdgModule & | rvsdgModule, |
| AliasAnalysis & | aliasAnalysis, | ||
| util::StatisticsCollector & | statisticsCollector | ||
| ) |
Performs alias analysis precision evaluation on the given rvsdgModule, using the given aliasAnalysis instance. If the given statisticsCollector does not demand Statistics::Id::AliasAnalysisPrecisionEvaluation, evaluation is skipped.
Definition at line 109 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Definition at line 163 of file AliasAnalysisPrecisionEvaluator.cpp.
|
private |
Definition at line 181 of file AliasAnalysisPrecisionEvaluator.cpp.
|
inlinenoexcept |
Definition at line 94 of file AliasAnalysisPrecisionEvaluator.hpp.
|
inlinenoexcept |
Definition at line 73 of file AliasAnalysisPrecisionEvaluator.hpp.
|
inlinenoexcept |
Definition at line 112 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Updates the pointers collected in the current context by tracing their origin. This is only done for pointers that are trivially passed directly through nodes or into regions.
Definition at line 317 of file AliasAnalysisPrecisionEvaluator.cpp.
|
staticprivate |
Outputs the aggregated clobber infos to the given output stream
| clobberInfos | the result of aggregating a set of clobbering operations |
| out | the stream to write the results to |
Definition at line 441 of file AliasAnalysisPrecisionEvaluator.cpp.
|
inlinenoexcept |
Enables or disables the creation of an aliasing graph. When enabled, the pass produces a GraphWriter output of the module, with an additional graph containing pointer values, and edges connecting pairs of pointers where the alias analysis responded MayAlias and MustAlias. The graph is written to an output file in the statistics directory.
| aliasingGraphEnabled | if true, evaluation will produce an aliasing graph. |
Definition at line 88 of file AliasAnalysisPrecisionEvaluator.hpp.
|
inlinenoexcept |
Enables or disables the deduplication of pointers during precision evaluation. Deduplication removes duplicate instances of (pointer, size) operations in each function. If any of the (pointer, size) operations is a clobber, the deduplicated operation is a clobber.
| deduplicatePointers | if true, pointers will be deduplicated. |
Definition at line 67 of file AliasAnalysisPrecisionEvaluator.hpp.
|
inlinenoexcept |
Makes loads count as clobbering operations. Alias queries are only made between pairs operations if at least one of them is a clobber. If alias queries between pairs of loads are desired, set this to true.
Default: false
| loadsConsideredClobbers | if true, loads will be clobbers. |
Definition at line 48 of file AliasAnalysisPrecisionEvaluator.hpp.
|
inlinenoexcept |
Enables or disables the creation of a file containing precision statistics per function. When enabled, the file is created in the statistics output directory.
| perFunctionOutputEnabled | if true, evaluation will print output per function to a file. |
Definition at line 106 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Definition at line 285 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Definition at line 291 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Definition at line 282 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Definition at line 279 of file AliasAnalysisPrecisionEvaluator.hpp.
|
private |
Definition at line 288 of file AliasAnalysisPrecisionEvaluator.hpp.