[PATCH] D77734: [AssumeBundles] Adapt RecursivelyDeleteTriviallyDeadInstructions and depending passes.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 09:40:15 PDT 2020


jdoerfert added a comment.

I think we need to run some of the affected passes with knowledge preservation to get more test coverage. Also two more comments below.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:8080
+      RecursivelyDeleteTriviallyDeadInstructions(I, nullptr, nullptr, AC);
+    }
 
----------------
jdoerfert wrote:
> Are we sure the instruction could not have been deleted at this point? If not we need to check for null in the cast.
> 
> ---
> 
> I think it is reasonable to assume all instructions are in the same function. We should query AC before the loop.
I'm unsure why I thought all dead instructions are in the same function. I somehow fear we need to sort them by function. Maybe we can go ahead with the patch without this change first?


================
Comment at: llvm/unittests/Transforms/Utils/LocalTest.cpp:39
+  bb0->insertInto(F);
+  bb1->insertInto(F);
 
----------------
Commit this as test improvements.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77734





More information about the llvm-commits mailing list