[PATCH] D78234: [BranchFolding] assert when removing INLINEASM_BR indirect targets
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 11:20:43 PDT 2020
efriedma added a comment.
The reason MachineBasicBlock has its own method to query successors is that there isn't any consistent way to query the successors based on MachineInstrs. Almost all branches are target-specific instruction, and a basic block can have more than one terminator. It's kind of fragile in certain situations, but it mostly works.
The reason I'm concerned here is that the InlineAsmBrIndirectTargets map doesn't cooperate with the other mechanism for tracking successors, so operations like splitting a basic block won't update it.
If we're going to store more information on the MachineInstr, I'd prefer to store it in the form of Operands, not some custom data structure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78234/new/
https://reviews.llvm.org/D78234
More information about the llvm-commits
mailing list