llvm-project/llvm/test/CodeGen/ARM/GlobalISel
Sjoerd Meijer 7efabe5c7d [MIR][ARM] MachineOperand comments
This adds infrastructure to print and parse MIR MachineOperand comments.
The motivation for the ARM backend is to print condition code names instead of
magic constants that are difficult to read (for human beings). For example,
instead of this:

  dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14, $noreg
  t2Bcc %bb.4, 0, killed $cpsr

we now print this:

  dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14 /* CC::always */, $noreg
  t2Bcc %bb.4, 0 /* CC:eq */, killed $cpsr

This shows that MachineOperand comments are enclosed between /* and */. In this
example, the EOR instruction is not conditionally executed (i.e. it is "always
executed"), which is encoded by the 14 immediate machine operand. Thus, now
this machine operand has /* CC::always */ as a comment. The 0 on the next
conditional branch instruction represents the equal condition code, thus now
this operand has /* CC:eq */ as a comment.

As it is a comment, the MI lexer/parser completely ignores it. The benefit is
that this keeps the change in the lexer extremely minimal and no target
specific parsing needs to be done. The changes on the MIPrinter side are also
minimal, as there is only one target hooks that is used to create the machine
operand comments.

Differential Revision: https://reviews.llvm.org/D74306
2020-02-24 14:19:21 +00:00
..
arm-call-lowering.ll [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-instruction-select-cmp.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-instruction-select-combos.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-instruction-select.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-irtranslator.ll [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-isel-divmod.ll
arm-isel-fp.ll
arm-isel-globals-pic.ll
arm-isel-globals-ropi-rwpi.ll
arm-isel-globals-static.ll
arm-isel.ll
arm-legalize-binops-neon.mir
arm-legalize-binops.mir
arm-legalize-bitcounts.mir GlobalISel: Fix lowering of G_CTLZ/G_CTTZ 2020-02-07 06:54:12 -08:00
arm-legalize-casts.mir
arm-legalize-cmp.mir
arm-legalize-consts.mir [GlobalISel]: Allow targets to override how to widen constants during legalization 2019-12-03 10:41:10 -08:00
arm-legalize-control-flow.mir
arm-legalize-divmod.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-legalize-exts.mir [globalisel] Add G_SEXT_INREG 2019-08-09 21:11:20 +00:00
arm-legalize-fp.mir [GlobalISel] Tidy up unnecessary calls to createGenericVirtualRegister 2020-01-31 17:07:16 +00:00
arm-legalize-globals.mir
arm-legalize-load-store.mir [globalisel] Rename G_GEP to G_PTR_ADD 2019-11-05 10:31:17 -08:00
arm-legalize-select.mir
arm-legalize-vfp4.mir [globalisel] Rename G_GEP to G_PTR_ADD 2019-11-05 10:31:17 -08:00
arm-legalizer.mir
arm-param-lowering.ll [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-regbankselect.mir [globalisel] Rename G_GEP to G_PTR_ADD 2019-11-05 10:31:17 -08:00
arm-select-copy_to_regclass-of-fptosi.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-select-globals-pic.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-select-globals-ropi-rwpi.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-select-globals-static.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
arm-unsupported.ll
irtranslator-varargs-lowering.ll [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
lit.local.cfg
pr35375.ll
select-clz.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-dbg.mir
select-fp-const.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-fp.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-neon.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-pkhbt.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-pr35926.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
select-revsh.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-instruction-select-cmp.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-isel-globals-pic.ll
thumb-isel-globals-ropi-rwpi.ll
thumb-isel-globals-static.ll
thumb-select-arithmetic-ops.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-br.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-casts.mir
thumb-select-exts.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-globals-pic.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-globals-ropi-rwpi.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-globals-static.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-imm.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-load-store.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-logical-ops.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-phi.mir
thumb-select-select.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00
thumb-select-shifts.mir [MIR][ARM] MachineOperand comments 2020-02-24 14:19:21 +00:00