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,
",");
49template <
typename AttrSite>
50bool addAssumptionsImpl(AttrSite &Site,
52 if (Assumptions.
empty())
57 if (!
set_union(CurAssumptions, Assumptions))
63 llvm::join(CurAssumptions.
begin(), CurAssumptions.
end(),
",")));
72 return ::hasAssumption(
A, AssumptionStr);
82 return ::hasAssumption(
A, AssumptionStr);
87 return ::getAssumptions(
A);
92 return ::getAssumptions(
A);
96 return ::addAssumptionsImpl(
F, Assumptions);
101 return ::addAssumptionsImpl(CB, Assumptions);
107 "omp_no_openmp_routines",
108 "omp_no_parallelism",
109 "omp_no_openmp_constructs",
110 "ompx_spmd_amenable",
112 "ompx_aligned_barrier",
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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")
This file defines generic set operations that may be used on set's of different types,...
static LLVM_ABI 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.
StringSet - A wrapper for StringMap that provides set-like functionality.
void insert_range(Range &&R)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI bool addAssumptions(Function &F, const DenseSet< StringRef > &Assumptions)
Appends the set of assumptions Assumptions to \F.
LLVM_ABI StringSet & getKnownAssumptionStrings()
A set of known assumption strings that are accepted without warning and which can be recommended as t...
bool set_union(S1Ty &S1, const S2Ty &S2)
set_union(A, B) - Compute A := A u B, return whether A changed.
LLVM_ABI bool hasAssumption(const Function &F, const KnownAssumptionString &AssumptionStr)
Return true if F has the assumption AssumptionStr attached.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
LLVM_ABI 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...