[PATCH] D37443: [tablegen] Handle common load/store predicates inside tablegen. NFC.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 10:19:58 PDT 2017


dsanders created this revision.
Herald added a subscriber: igorb.

GlobalISel and SelectionDAG require different code for the common
load/store predicates due to differences in the representation.
For example:

  SelectionDAG: (load<signext,i8>:i32 GPR32:$addr) // The <> denote properties of the SDNode that are not printed in the DAG
  GlobalISel: (G_SEXT:s32 (G_LOAD:s8 GPR32:$addr))

Even without that, differences in the IR (SDNode vs MachineInstr) require
differences in the C++ predicate.

This patch moves the implementation of the common load/store predicates
into tablegen so that it can handle these differences.

It's NFC for SelectionDAG since it emits equivalent code and it's NFC for
GlobalISel since the rules involving the relevant predicates are still
rejected by the importer.

Depends on https://reviews.llvm.org/D36618


https://reviews.llvm.org/D37443

Files:
  include/llvm/Target/TargetSelectionDAG.td
  utils/TableGen/CodeGenDAGPatterns.cpp
  utils/TableGen/CodeGenDAGPatterns.h
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37443.113772.patch
Type: text/x-patch
Size: 27474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170904/548922ca/attachment.bin>


More information about the llvm-commits mailing list