OSDN Git Service

AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands
authorPetar Avramovic <Petar.Avramovic@amd.com>
Mon, 14 Sep 2020 08:39:25 +0000 (10:39 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Mon, 14 Sep 2020 08:39:56 +0000 (10:39 +0200)
commit09b8871f8d81ce2777afe836604f392a2af9e620
tree7183ea9c94a6be33de57bf4635aaa555c2396326
parentbfcb824ba5287f96c5b9f1009d10af37b7eb9519
AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands

Predicates with 'let PredicateCodeUsesOperands = 1' want to examine
matched operands. When we encounter predicate code that uses operands,
analyze its named operand arguments and create a map between argument
index and name. Later, when leaf node with name is encountered, emit
GIM_RecordNamedOperand that will store that operand at its argument
index in operand list. This operand list will be an argument to c++
code of the predicate.

Differential Revision: https://reviews.llvm.org/D87285
llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
llvm/lib/Target/AMDGPU/VOP3Instructions.td
llvm/test/CodeGen/AMDGPU/GlobalISel/add_shl.ll [new file with mode: 0644]
llvm/test/TableGen/GlobalISelEmitter.td
llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
llvm/utils/TableGen/GlobalISelEmitter.cpp