[PATCH] D66955: [DebugInfo][If-Converter] Update call site info during the optimization
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 13:05:03 PDT 2019
efriedma added inline comments.
================
Comment at: lib/CodeGen/BranchFolding.cpp:168
+ MF->eraseCallSiteInfo(&MI);
+ });
// Remove the block.
----------------
NikolaPrica wrote:
> 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.
Ok, that makes sense.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66955/new/
https://reviews.llvm.org/D66955
More information about the llvm-commits
mailing list