[PATCH] D50833: [x86/MIR] Implement support for pre- and post-instruction symbols, as well as MIR parsing support for `MCSymbol` `MachineOperand`s.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 02:22:53 PDT 2018


chandlerc updated this revision to Diff 160981.
chandlerc retitled this revision from "[x86/MIR] Add full MIR support for pre- and post-instruction symbols, as well as parsing support for `MCSymbol` `MachineOperand`s." to "[x86/MIR] Implement support for pre- and post-instruction symbols, as well as MIR parsing support for `MCSymbol` `MachineOperand`s.".
chandlerc edited the summary of this revision.
chandlerc added a comment.

Update this to be the complete implementation of pre- and post-instruction
symbol emission.

It turned out that implementing the actual emission was 4 lines and is fully
target independent! Win!

I've also included a test that specifically emits this stuff and checks that it
works on x86. Happy for other target maintainers to get tests for their target,
but given the complexity of crafting a MIR test, I'd like to defer that to
folks familiar w/ those backends and motivated to check support here.
Especially given how trivial the actual implementation is here.

I've also improved the MIR parsing test case to double check that we parse back
the *operands* as well as the pre- and post- symbols. I had verified it myself,
but seems important to actually check.


Repository:
  rL LLVM

https://reviews.llvm.org/D50833

Files:
  llvm/docs/MIRLangRef.rst
  llvm/include/llvm/CodeGen/MachineInstr.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/MIRParser/MILexer.cpp
  llvm/lib/CodeGen/MIRParser/MILexer.h
  llvm/lib/CodeGen/MIRParser/MIParser.cpp
  llvm/lib/CodeGen/MIRPrinter.cpp
  llvm/lib/CodeGen/MachineInstr.cpp
  llvm/test/CodeGen/MIR/X86/instr-symbols-and-mcsymbol-operands.mir
  llvm/test/CodeGen/X86/instr-symbols.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50833.160981.patch
Type: text/x-patch
Size: 23576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180816/2df0295c/attachment.bin>


More information about the llvm-commits mailing list