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

Nikola Prica via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 00:04:09 PDT 2019


NikolaPrica marked an inline comment as done.
NikolaPrica added inline comments.


================
Comment at: lib/CodeGen/BranchFolding.cpp:168
+      MF->eraseCallSiteInfo(&MI);
+  });
   // Remove the block.
----------------
efriedma wrote:
> This looks fine, but did you mean to include it here?
Yes. I meant to include it here. The assertion from `MachineFunction::DeleteMachineInstr` was triggered here. With analysis I came to the conclusion that it is a consequence of removing predecessors of MachineBasicBlock after calling `IfConverter::CopyAndPredicateBlock` in `IfConvertSimple` or `IfConvertTriangle` optimizations. At some point certain MBB will not have any predecessors and thus it will be removed during the BranchFolding optimization which also removes dead blocks. Without this part of code test case "DebugInfo/MIR/ARM/if-coverter-call-site-info.mir" would trigger mentioned assertion.


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

https://reviews.llvm.org/D66955





More information about the llvm-commits mailing list