14 #ifndef LLVM_SUPPORT_CFGUPDATE_H 15 #define LLVM_SUPPORT_CFGUPDATE_H 28 template <
typename NodePtr>
class Update {
35 : From(From), ToAndKind(To, Kind) {}
41 return From == RHS.From && ToAndKind == RHS.ToAndKind;
46 getFrom()->printAsOperand(OS,
false);
48 getTo()->printAsOperand(OS,
false);
51 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 62 template <
typename NodePtr>
72 Operations.
reserve(AllUpdates.size());
74 for (
const auto &U : AllUpdates) {
75 NodePtr
From = U.getFrom();
76 NodePtr To = U.getTo();
84 Result.reserve(Operations.
size());
85 for (
auto &
Op : Operations) {
86 const int NumInsertions =
Op.second;
88 if (NumInsertions == 0)
92 Result.push_back({UK,
Op.first.first,
Op.first.second});
99 for (
size_t i = 0,
e = AllUpdates.size(); i !=
e; ++i) {
100 const auto &U = AllUpdates[i];
102 Operations[{U.getFrom(), U.getTo()}] = int(i);
104 Operations[{U.getTo(), U.getFrom()}] = int(i);
117 #endif // LLVM_SUPPORT_CFGUPDATE_H
This class represents lattice values for constants.
PointerTy getPointer() const
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This file implements a class to represent arbitrary precision integral constant values and operations...
void print(raw_ostream &OS) const
LLVM_DUMP_METHOD void dump() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void LegalizeUpdates(ArrayRef< Update< NodePtr >> AllUpdates, SmallVectorImpl< Update< NodePtr >> &Result, bool InverseGraph)
bool operator==(const Update &RHS) const
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
void reserve(size_type NumEntries)
Grow the densemap so that it can contain at least NumEntries items before resizing again...
void sort(IteratorTy Start, IteratorTy End)
BlockVerifier::State From
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
APFloat abs(APFloat X)
Returns the absolute value of the argument.
UpdateKind getKind() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
Update(UpdateKind Kind, NodePtr From, NodePtr To)