[PATCH] D71093: [InstCombine] Insert instructions before adding them to worklist

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 09:48:05 PST 2019


lebedev.ri added a comment.

I'm sorry, i'm not following the patch's logic anymore.
First it was about relying on `Add()` printing `ADD:` line, and now
all the printing stuff seems to be gone and the patch is adding some
invariants on when the instruction should be inserted into worklist?

Does the current diff still achieve the same initial goal of not printing `badref`?
How? If not, the description is not longer applicable, and post a new patch instead?

Apologies if i'm horribly misreading the patch?



================
Comment at: llvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h:95-96
+      auto *UI = cast<Instruction>(U);
+      // Do not add instructions that haven't been properly inserted yet.
+      if (UI->getParent()) {
+        Add(UI);
----------------
The described behavior sounds like a bug to me.
More importantly, it's not related to the printing changes?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71093/new/

https://reviews.llvm.org/D71093





More information about the llvm-commits mailing list