// base relation will remain. Internally, we add a mixture of the two
// types, then update all the second type to the first type
typedef DenseMap<Value *, Value *> DefiningValueMapTy;
-typedef std::set<llvm::Value *> StatepointLiveSetTy;
+typedef DenseSet<llvm::Value *> StatepointLiveSetTy;
struct PartiallyConstructedSafepointRecord {
/// The set of values known to be live accross this safepoint
// postconditions: populates liveValues as discussed above
static void findLiveGCValuesAtInst(Instruction *term, BasicBlock *pred,
DominatorTree &DT, LoopInfo *LI,
- std::set<llvm::Value *> &liveValues) {
+ StatepointLiveSetTy &liveValues) {
liveValues.clear();
assert(isa<CallInst>(term) || isa<InvokeInst>(term) || term->isTerminator());
Instruction *inst = CS.getInstruction();
BasicBlock *BB = inst->getParent();
- std::set<Value *> liveset;
+ StatepointLiveSetTy liveset;
findLiveGCValuesAtInst(inst, BB, DT, nullptr, liveset);
if (PrintLiveSet) {
// post condition: PointerToBase contains one (derived, base) pair for every
// pointer in live. Note that derived can be equal to base if the original
// pointer was a base pointer.
-static void findBasePointers(const std::set<llvm::Value *> &live,
+static void findBasePointers(const StatepointLiveSetTy &live,
DenseMap<llvm::Value *, llvm::Value *> &PointerToBase,
DominatorTree *DT, DefiningValueMapTy &DVCache,
DenseSet<llvm::Value *> &NewInsertedDefs) {
/// Check for liveness of items in the insert defs and add them to the live
/// and base pointer sets
static void fixupLiveness(DominatorTree &DT, const CallSite &CS,
- const std::set<Value *> &allInsertedDefs,
+ const DenseSet<Value *> &allInsertedDefs,
PartiallyConstructedSafepointRecord &result) {
Instruction *inst = CS.getInstruction();
static void fixupLiveReferences(
Function &F, DominatorTree &DT, Pass *P,
- const std::set<llvm::Value *> &allInsertedDefs,
+ const DenseSet<llvm::Value *> &allInsertedDefs,
ArrayRef<CallSite> toUpdate,
MutableArrayRef<struct PartiallyConstructedSafepointRecord> records) {
for (size_t i = 0; i < records.size(); i++) {
}
}
-static void addBasesAsLiveValues(std::set<Value *> &liveset,
+static void addBasesAsLiveValues(StatepointLiveSetTy &liveset,
DenseMap<Value *, Value *> &PointerToBase) {
// Identify any base pointers which are used in this safepoint, but not
// themselves relocated. We need to relocate them so that later inserted
// gep a + 1
// safepoint 2
// br loop
- std::set<llvm::Value *> allInsertedDefs;
+ DenseSet<llvm::Value *> allInsertedDefs;
for (size_t i = 0; i < records.size(); i++) {
struct PartiallyConstructedSafepointRecord &info = records[i];
allInsertedDefs.insert(info.NewInsertedDefs.begin(),