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

Wei Ding via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 20:52:36 PDT 2017


wdng added a comment.

Hi, is it possible to upload a full diff?



================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:3947
+      // Do not add to worklist twice!
+      if(Worklist.end() == llvm::find(Worklist, &MI))
+        Worklist.push_back(&MI);
----------------
cfang wrote:
> arsenm wrote:
> > arsenm wrote:
> > > Missing space
> > I think the worklist can be pretty big. A brute force search through is probably bad.
> What's your suggestion for the search in smallvector?
I would suggest to use hash for O(1) search.


https://reviews.llvm.org/D34726





More information about the llvm-commits mailing list