13#ifndef LLVM_IR_PREDITERATORCACHE_H
14#define LLVM_IR_PREDITERATORCACHE_H
50 BlockToPredCountMap[BB] = PredCache.
size() - 1;
53 std::copy(PredCache.
begin(), PredCache.
end(), Entry);
58 auto Result = BlockToPredCountMap.
find(BB);
59 if (Result != BlockToPredCountMap.
end())
60 return Result->second;
61 return BlockToPredCountMap[BB] =
pred_size(BB);
67 return ArrayRef(GetPreds(BB), GetNumPreds(BB));
72 BlockToPredsMap.
clear();
73 BlockToPredCountMap.
clear();
This file defines the BumpPtrAllocator interface.
This file defines the DenseMap class.
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
LLVM Basic Block Representation.
Allocate memory in an ever growing pool, as if by bump-pointer.
iterator find(const_arg_type_t< KeyT > Val)
PredIteratorCache - This class is an extremely trivial cache for predecessor iterator queries.
void clear()
clear - Remove all information.
size_t size(BasicBlock *BB) const
ArrayRef< BasicBlock * > get(BasicBlock *BB)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This class provides various memory handling functions that manipulate MemoryBlock instances.
This is an optimization pass for GlobalISel generic memory operations.
auto predecessors(const MachineBasicBlock *BB)
unsigned pred_size(const MachineBasicBlock *BB)