15#ifndef LLVM_ADT_SETOPERATIONS_H
16#define LLVM_ADT_SETOPERATIONS_H
22template <
class S1Ty,
class S2Ty>
26 for (
typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end();
28 if (S1.insert(*SI).second)
39template <
class S1Ty,
class S2Ty>
41 for (
typename S1Ty::iterator
I = S1.begin();
I != S1.end();) {
44 if (!S2.count(
E)) S1.erase(
E);
48template <
class S1Ty,
class S2Ty>
51 for (
typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end(); SI != SE;
59template <
class S1Ty,
class S2Ty>
61 if (S1.size() < S2.size())
69template <
class S1Ty,
class S2Ty>
72 for (
typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end();
81template <
class S1Ty,
class S2Ty>
83 for (
typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end();
91template <
class S1Ty,
class S2Ty>
92void set_subtract(S1Ty &S1,
const S2Ty &S2, S1Ty &Removed, S1Ty &Remaining) {
93 for (
typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); SI != SE;
98 Remaining.insert(*SI);
103template <
class S1Ty,
class S2Ty>
105 if (S1.size() > S2.size())
107 for (
const auto It : S1)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This is an optimization pass for GlobalISel generic memory operations.
void set_intersect(S1Ty &S1, const S2Ty &S2)
set_intersect(A, B) - Compute A := A ^ B Identical to set_intersection, except that it works on set<>...
bool set_is_subset(const S1Ty &S1, const S2Ty &S2)
set_is_subset(A, B) - Return true iff A in B
void set_subtract(S1Ty &S1, const S2Ty &S2)
set_subtract(A, B) - Compute A := A - B
bool set_union(S1Ty &S1, const S2Ty &S2)
set_union(A, B) - Compute A := A u B, return whether A changed.
S1Ty set_intersection(const S1Ty &S1, const S2Ty &S2)
set_intersection(A, B) - Return A ^ B
S1Ty set_difference(const S1Ty &S1, const S2Ty &S2)
set_difference(A, B) - Return A - B
S1Ty set_intersection_impl(const S1Ty &S1, const S2Ty &S2)