[PATCH] D50094: Introduce DebugCounter into ConstProp pass

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 13:36:59 PDT 2018


george.burgess.iv added inline comments.


================
Comment at: lib/Transforms/Scalar/ConstantProp.cpp:82
   while (!WorkList.empty()) {
     Instruction *I = *WorkList.begin();
     WorkList.erase(WorkList.begin());    // Get an element from the worklist...
----------------
Looks like we make no attempt to traverse this function in a stable order (we're relying on the iteration order of a `std::set<Instruction *>`, and pointers don't have a guaranteed relative order from execution to execution), so I don't think this'll do what we want?


Repository:
  rL LLVM

https://reviews.llvm.org/D50094





More information about the llvm-commits mailing list