15 #ifndef LLVM_SUPPORT_CFGUPDATE_H 16 #define LLVM_SUPPORT_CFGUPDATE_H 29 template <
typename NodePtr>
class Update {
36 : From(From), ToAndKind(To, Kind) {}
42 return From == RHS.From && ToAndKind == RHS.ToAndKind;
47 getFrom()->printAsOperand(OS,
false);
49 getTo()->printAsOperand(OS,
false);
52 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 63 template <
typename NodePtr>
73 Operations.
reserve(AllUpdates.size());
75 for (
const auto &U : AllUpdates) {
85 Result.reserve(Operations.
size());
86 for (
auto &
Op : Operations) {
87 const int NumInsertions =
Op.second;
89 if (NumInsertions == 0)
93 Result.push_back({UK,
Op.first.first,
Op.first.second});
100 for (
size_t i = 0, e = AllUpdates.size(); i != e; ++i) {
101 const auto &U = AllUpdates[i];
103 Operations[{U.getFrom(), U.getTo()}] = int(i);
105 Operations[{U.getTo(), U.getFrom()}] = int(i);
118 #endif // LLVM_SUPPORT_CFGUPDATE_H
This class represents lattice values for constants.
PointerTy getPointer() const
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")
std::shared_ptr< Node > NodePtr
Short-hand for a Node pointer.
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)