[PATCH] D156999: [Inline Spiller] Consider bundles when marking defs as dead

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 08:27:02 PDT 2023


piotr added inline comments.


================
Comment at: llvm/lib/CodeGen/InlineSpiller.cpp:757
+            LLVM_DEBUG(dbgs() << "All defs dead: " << *It);
+            DeadDefs.push_back(&*It);
+          }
----------------
arsenm wrote:
> piotr wrote:
> > piotr wrote:
> > > arsenm wrote:
> > > > I don't think you can necessarily just delete any dead defs within the bundle without knowing you can delete all the dead defs in the bundle (with the possible exception of copies)
> > > How can I know if it is safe to delete the dead defs in the bundle then? Do I need a stricter check somewhere? Should this be checking for the COPY explicitly?
> > Are you suggesting this should just go through the defs first and see if all of them can be deleted, and only then do the deletion?
> Yes, with the possible exception of copies. I'm unclear on the rules since these aren't fully formed bundles.
The verifier error I'm chasing here only happens for copies, as it is hitting copies produced in buildSingleSubRegCopy, so special-casing copies would work here. I'll post an update soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156999



More information about the llvm-commits mailing list