This is an archive of the discontinued LLVM Phabricator instance.

[MIRParser] Add support for IsInlineAsmBrIndirectTarget
ClosedPublic

Authored by foad on Oct 7 2021, 2:47 AM.

Details

Summary

Print this basic block flag as inlineasm-br-indirect-target and parse
it. This allows you to write MIR test cases for INLINEASM_BR. The test
case I added is one that I wanted to precommit anyway for D110834.

Diff Detail

Event Timeline

foad created this revision.Oct 7 2021, 2:47 AM
foad requested review of this revision.Oct 7 2021, 2:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2021, 2:47 AM
jyknight accepted this revision.Oct 7 2021, 7:33 AM
jyknight added inline comments.
llvm/test/CodeGen/X86/callbr-asm-kill.mir
3

Can you add a comment to this file as to what this test is supposed to be testing? Especially since it's actually a test for a future commit.

This revision is now accepted and ready to land.Oct 7 2021, 7:33 AM
llvm/lib/CodeGen/MachineBasicBlock.cpp
523

seeing this much duplication makes me think we could DRY up attribute emission. Maybe a helper method would simply codegen here?

MatzeB accepted this revision.Oct 7 2021, 10:58 AM

Thanks!

This revision was landed with ongoing or failed builds.Oct 7 2021, 11:08 AM
This revision was automatically updated to reflect the committed changes.
foad added inline comments.Oct 7 2021, 11:47 PM
llvm/lib/CodeGen/MachineBasicBlock.cpp
523

We could do something like this to common up the simple attributes, but it doesn't help with attributes like "align" that take a value: https://reviews.llvm.org/differential/diff/378106/