Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Worklist

1 //===- InstCombineWorklist.h - Worklist for InstCombine pass ----*- C++ -*-===//
23 /// InstCombineWorklist - This is the worklist management logic for
26 SmallVector<Instruction*, 256> Worklist;
34 bool isEmpty() const { return Worklist.empty(); }
36 /// Add - Add the specified instruction to the worklist if it isn't already
39 if (WorklistMap.insert(std::make_pair(I, Worklist.size())).second) {
41 Worklist.push_back(I);
51 /// which should only be done when the worklist is empty and when the group
54 assert(Worklist.empty() && "Worklist must be empty to add initial group");
55 Worklist.reserve(NumEntries+16);
57 DEBUG(errs() << "IC: ADDING: " << NumEntries << " instrs to worklist\n");
61 Worklist.push_back(I);
65 // Remove - remove I from the worklist if it exists.
68 if (It == WorklistMap.end()) return; // Not in worklist.
71 Worklist[It->second] = 0;
77 Instruction *I = Worklist.back();
78 Worklist.pop_back();
94 /// Zap - check that the worklist is empty and nuke the backing store for
97 assert(WorklistMap.empty() && "Worklist empty, but map not?");