LLVM 17.0.0git
|
Classes | |
struct | AliasSummary |
AliasSummary is just a collection of ExternalRelation and ExternalAttribute. More... | |
struct | ExternalAttribute |
We use ExternalAttribute to describe an externally visible AliasAttrs for parameters/return value. More... | |
struct | ExternalRelation |
We use ExternalRelation to describe an externally visible aliasing relations between parameters/return value of a function. More... | |
struct | InstantiatedAttr |
This is the result of instantiating ExternalAttribute at a particular callsite. More... | |
struct | InstantiatedRelation |
This is the result of instantiating ExternalRelation at a particular callsite. More... | |
struct | InstantiatedValue |
This is the result of instantiating InterfaceValue at a particular call. More... | |
struct | InterfaceValue |
We use InterfaceValue to describe parameters/return value, as well as potential memory locations that are pointed to by parameters/return value, of a function. More... | |
struct | StratifiedInfo |
NOTE: ^ This can't be a short – bootstrapping clang has a case where ~1M sets exist. More... | |
struct | StratifiedLink |
A "link" between two StratifiedSets. More... | |
class | StratifiedSets |
These are stratified sets, as described in "Fast algorithms for
Dyck-CFL-reachability with applications to Alias Analysis" by Zhang Q, Lyu M R, Yuan H, and Su Z. More... | |
class | StratifiedSetsBuilder |
Generic Builder class that produces StratifiedSets instances. More... | |
Typedefs | |
typedef std::bitset< NumAliasAttrs > | AliasAttrs |
These are attributes that an alias analysis can use to mark certain special properties of a given pointer. | |
typedef unsigned | StratifiedIndex |
An index into Stratified Sets. | |
Variables | |
static const unsigned | NumAliasAttrs = 32 |
The number of attributes that AliasAttr should contain. | |
static const unsigned | MaxSupportedArgsInSummary = 50 |
The maximum number of arguments we can put into a summary. | |
static const int64_t | UnknownOffset = INT64_MAX |
typedef std::bitset<NumAliasAttrs> llvm::cflaa::AliasAttrs |
These are attributes that an alias analysis can use to mark certain special properties of a given pointer.
Refer to the related functions below to see what kinds of attributes are currently defined.
Definition at line 61 of file AliasAnalysisSummary.h.
typedef unsigned llvm::cflaa::StratifiedIndex |
An index into Stratified Sets.
Definition at line 26 of file StratifiedSets.h.
|
inline |
Definition at line 144 of file AliasAnalysisSummary.h.
References LHS, RHS, and UnknownOffset.
|
static |
Definition at line 44 of file AliasAnalysisSummary.cpp.
Referenced by getGlobalOrArgAttrFromValue().
AliasAttrs llvm::cflaa::getAttrCaller | ( | ) |
AttrCaller represent whether the said pointer comes from a source not known to the current function but known to the caller.
Values pointed to by the arguments of the current function have this attribute set
Definition at line 35 of file AliasAnalysisSummary.cpp.
AliasAttrs llvm::cflaa::getAttrEscaped | ( | ) |
AttrEscaped represent whether the said pointer comes from a known source but escapes to the unknown world (e.g.
casted to an integer, or passed as an argument to opaque function). Unlike non-escaped pointers, escaped ones may alias pointers coming from unknown sources.
Definition at line 41 of file AliasAnalysisSummary.cpp.
AliasAttrs llvm::cflaa::getAttrNone | ( | ) |
Attr represent whether the said pointer comes from an unknown source (such as opaque memory or an integer cast).
Definition at line 30 of file AliasAnalysisSummary.cpp.
AliasAttrs llvm::cflaa::getAttrUnknown | ( | ) |
AttrUnknown represent whether the said pointer comes from a source not known to alias analyses (such as opaque memory or an integer cast).
Definition at line 32 of file AliasAnalysisSummary.cpp.
AliasAttrs llvm::cflaa::getExternallyVisibleAttrs | ( | AliasAttrs | ) |
Given an AliasAttrs, return a new AliasAttrs that only contains attributes meaningful to the caller.
This function is primarily used for interprocedural analysis Currently, externally visible AliasAttrs include AttrUnknown, AttrGlobal, and AttrEscaped
Definition at line 72 of file AliasAnalysisSummary.cpp.
AliasAttrs llvm::cflaa::getGlobalOrArgAttrFromValue | ( | const Value & | ) |
AttrGlobal represent whether the said pointer is a global value.
AttrArg represent whether the said pointer is an argument, and if so, what index the argument has.
Definition at line 52 of file AliasAnalysisSummary.cpp.
References Arg, and argNumberToAttr().
bool llvm::cflaa::hasCallerAttr | ( | AliasAttrs | Attr | ) |
Definition at line 36 of file AliasAnalysisSummary.cpp.
bool llvm::cflaa::hasEscapedAttr | ( | AliasAttrs | Attr | ) |
Definition at line 42 of file AliasAnalysisSummary.cpp.
bool llvm::cflaa::hasUnknownAttr | ( | AliasAttrs | Attr | ) |
Definition at line 33 of file AliasAnalysisSummary.cpp.
bool llvm::cflaa::hasUnknownOrCallerAttr | ( | AliasAttrs | Attr | ) |
Definition at line 37 of file AliasAnalysisSummary.cpp.
std::optional< InstantiatedAttr > llvm::cflaa::instantiateExternalAttribute | ( | ExternalAttribute | EAttr, |
CallBase & | Call | ||
) |
Definition at line 97 of file AliasAnalysisSummary.cpp.
References llvm::cflaa::ExternalAttribute::Attr, instantiateInterfaceValue(), and llvm::cflaa::ExternalAttribute::IValue.
std::optional< InstantiatedRelation > llvm::cflaa::instantiateExternalRelation | ( | ExternalRelation | ERelation, |
CallBase & | Call | ||
) |
Definition at line 86 of file AliasAnalysisSummary.cpp.
References llvm::cflaa::ExternalRelation::From, From, instantiateInterfaceValue(), llvm::cflaa::ExternalRelation::Offset, and llvm::cflaa::ExternalRelation::To.
std::optional< InstantiatedValue > llvm::cflaa::instantiateInterfaceValue | ( | InterfaceValue | IValue, |
CallBase & | Call | ||
) |
Definition at line 77 of file AliasAnalysisSummary.cpp.
References llvm::cflaa::InterfaceValue::DerefLevel, and llvm::cflaa::InterfaceValue::Index.
Referenced by instantiateExternalAttribute(), and instantiateExternalRelation().
bool llvm::cflaa::isGlobalOrArgAttr | ( | AliasAttrs | Attr | ) |
Definition at line 65 of file AliasAnalysisSummary.cpp.
|
inline |
Definition at line 161 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 212 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 122 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 164 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 215 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 125 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 178 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 222 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 132 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 158 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 209 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 119 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 175 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 219 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 129 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 181 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 225 of file AliasAnalysisSummary.h.
|
inline |
Definition at line 135 of file AliasAnalysisSummary.h.
The maximum number of arguments we can put into a summary.
Definition at line 104 of file AliasAnalysisSummary.h.
The number of attributes that AliasAttr should contain.
Attributes are described below, and 32 was an arbitrary choice because it fits nicely in 32 bits (because we use a bitset for AliasAttr).
Definition at line 56 of file AliasAnalysisSummary.h.
Definition at line 142 of file AliasAnalysisSummary.h.
Referenced by addOffset().