Lines Matching refs:Worklist
183 /// RemoveLoopFromWorklist - If the specified loop is on the loop worklist,
214 void SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L);
216 std::vector<Instruction*> &Worklist, Loop *l);
917 /// RemoveFromWorklist - Remove all instances of I from the worklist vector
920 std::vector<Instruction*> &Worklist) {
922 Worklist.erase(std::remove(Worklist.begin(), Worklist.end(), I),
923 Worklist.end());
927 /// program, replacing all uses with V and update the worklist.
929 std::vector<Instruction*> &Worklist,
933 // Add uses to the worklist, which may be dead now.
936 Worklist.push_back(Use);
938 // Add users to the worklist which may be simplified now.
941 Worklist.push_back(cast<Instruction>(*UI));
943 RemoveFromWorklist(I, Worklist);
953 std::vector<Instruction*> &Worklist,
961 ReplaceUsesOfWith(PN, PN->getIncomingValue(0), Worklist, L, LPM);
978 RemoveBlockIfDead(BB, Worklist, L);
982 // If pred ends in a uncond branch, add uncond branch to worklist so that
986 Worklist.push_back(BI);
993 // Remove the instructions in the basic block from the worklist.
995 RemoveFromWorklist(I, Worklist);
1054 RemoveBlockIfDead(Succs[i], Worklist, L);
1085 std::vector<Instruction*> Worklist;
1104 Worklist.push_back(U);
1107 for (std::vector<Instruction*>::iterator UI = Worklist.begin(),
1108 UE = Worklist.end(); UI != UE; ++UI)
1111 SimplifyCode(Worklist, L);
1124 Worklist.push_back(U);
1187 SimplifyCode(Worklist, L);
1199 void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) {
1200 while (!Worklist.empty()) {
1201 Instruction *I = Worklist.back();
1202 Worklist.pop_back();
1208 // Add uses to the worklist, which may be dead now.
1211 Worklist.push_back(Use);
1213 RemoveFromWorklist(I, Worklist);
1224 ReplaceUsesOfWith(I, V, Worklist, L, LPM);
1244 ReplaceUsesOfWith(PN, PN->getIncomingValue(0), Worklist, L, LPM);
1255 RemoveFromWorklist(BI, Worklist);
1274 Worklist.push_back(BranchInst::Create(LiveSucc, BI));
1277 RemoveFromWorklist(BI, Worklist);
1280 RemoveBlockIfDead(DeadSucc, Worklist, L);