[PATCH] D42012: [GlobalISel][TableGen] Add support for SDNodeXForm

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 14:39:48 PST 2018


volkan created this revision.
volkan added reviewers: dsanders, ab, rovka.
Herald added subscribers: mgrang, javed.absar, kristof.beyls.

This patch adds CustomRenderer which renders the matched
operands to the specified instruction.

Targets can enable the matching of SDNodeXForm by adding
a definition that inherits from GICustomOperandRenderer and
GISDNodeXFormEquiv as follows.

def gi_imm8 : GICustomOperandRenderer<"renderImm8”>,

  GISDNodeXFormEquiv<imm8_xform>;

Custom renderer functions should be of the form:
void render(MachineInstrBuilder &MIB, const MachineInstr &I);


https://reviews.llvm.org/D42012

Files:
  include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  include/llvm/Target/GlobalISel/SelectionDAGCompat.td
  include/llvm/Target/GlobalISel/Target.td
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  test/CodeGen/AArch64/GlobalISel/select-mul.mir
  test/TableGen/GlobalISelEmitter.td
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42012.129711.patch
Type: text/x-patch
Size: 25013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180112/64bcd4f7/attachment-0001.bin>


More information about the llvm-commits mailing list