[PATCH] D34726: AMDGPU/SI: Do not insert an instruction into worklist twice in movetovalu

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 12:37:26 PDT 2017


t-tye added inline comments.


================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:3415-3418
+    InstrSetIterator MIIterator = Worklist.begin();
+    for (InstrSetIterator I = MIIterator, E = Worklist.end(); I != E; I++) {
+       MIIterator = I;
+    }
----------------
@alfred.j.huang you mention "SmallPtrVector access is last in first out". Is that true when the SmallPtrVector exceeds the size of the small number? If not then if the worklist gets larger than 32 it will no longer be deterministic in the order it returns the work list items which IIRC is against the LLVM policy which wants compilation to be consistent from run to run.


https://reviews.llvm.org/D34726





More information about the llvm-commits mailing list