[PATCH] D66955: [DebugInfo][If-Converter] Update call site info during the optimization

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 14:51:48 PDT 2019


vsk added inline comments.


================
Comment at: lib/CodeGen/IfConversion.cpp:1779
+    if (DI1->isCall(MachineInstr::IgnoreBundle))
+      MBB1.getParent()->updateCallSiteInfo(&*DI1);
+
----------------
aprantl wrote:
> It looks like we will have to do something similar in a lot of places. Have you thought about a way to make this more automatic, for example by registering a hook on deleted instructions that gets called automatically (I don't know what kind of infrastructure we have, but I'm thinking of something akin to salvageDebugInfo())?
I've asked about this before. The rationale for weeding out issues with an assert is to a) avoid slowing down each MachineInstr::eraseFromParent call and b) allow for the possibility of preserving call site information on inst deletion rather than throwing it away. This makes sense to me: I'm satisfied that we have an assert that lets us find the places call site info needs to be updated.


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

https://reviews.llvm.org/D66955





More information about the llvm-commits mailing list