28 assert(
A.isStringAttribute() &&
"Expected a string attribute!");
31 A.getValueAsString().split(Strings,
",");
39 assert(
A.isStringAttribute() &&
"Expected a string attribute!");
43 A.getValueAsString().split(Strings,
",");
50template <
typename AttrSite>
51bool addAssumptionsImpl(AttrSite &Site,
53 if (Assumptions.
empty())
58 if (!
set_union(CurAssumptions, Assumptions))
64 llvm::join(CurAssumptions.
begin(), CurAssumptions.
end(),
",")));
73 return ::hasAssumption(
A, AssumptionStr);
83 return ::hasAssumption(
A, AssumptionStr);
88 return ::getAssumptions(
A);
93 return ::getAssumptions(
A);
97 return ::addAssumptionsImpl(
F, Assumptions);
102 return ::addAssumptionsImpl(CB, Assumptions);
107 "omp_no_openmp_routines",
108 "omp_no_parallelism",
109 "ompx_spmd_amenable",
This file contains the simple types necessary to represent the attributes associated with functions a...
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines generic set operations that may be used on set's of different types,...
static Attribute get(LLVMContext &Context, AttrKind Kind, uint64_t Val=0)
Return a uniquified Attribute object.
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation or the function signa...
Attribute getFnAttr(StringRef Kind) const
Get the attribute of a given kind for the function.
Implements a dense probed hash-table based set.
This is an important class for using LLVM in a threaded context.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
StringSet - A wrapper for StringMap that provides set-like functionality.
std::pair< iterator, bool > insert(const ValueT &V)
This is an optimization pass for GlobalISel generic memory operations.
bool addAssumptions(Function &F, const DenseSet< StringRef > &Assumptions)
Appends the set of assumptions Assumptions to \F.
bool set_union(S1Ty &S1, const S2Ty &S2)
set_union(A, B) - Compute A := A u B, return whether A changed.
bool hasAssumption(const Function &F, const KnownAssumptionString &AssumptionStr)
Return true if F has the assumption AssumptionStr attached.
StringSet KnownAssumptionStrings
A set of known assumption strings that are accepted without warning and which can be recommended as t...
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
DenseSet< StringRef > getAssumptions(const Function &F)
Return the set of all assumptions for the function F.
constexpr StringRef AssumptionAttrKey
The key we use for assumption attributes.
Helper that allows to insert a new assumption string in the known assumption set by creating a (stati...