LLVM 22.0.0git
NVPTXSelectionDAGInfo.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11#define GET_SDNODE_DESC
12#include "NVPTXGenSDNodeInfo.inc"
13
14using namespace llvm;
15
18
20
21const char *NVPTXSelectionDAGInfo::getTargetNodeName(unsigned Opcode) const {
22#define MAKE_CASE(V) \
23 case V: \
24 return #V;
25
26 // These nodes don't have corresponding entries in *.td files yet.
27 switch (static_cast<NVPTXISD::NodeType>(Opcode)) {
42 }
43#undef MAKE_CASE
44
46}
47
49 // These nodes don't have corresponding entries in *.td files.
50 if (Opcode >= NVPTXISD::FIRST_MEMORY_OPCODE &&
52 return true;
53
55}
56
58 const SDNode *N) const {
59 switch (N->getOpcode()) {
60 default:
61 break;
62 case NVPTXISD::ProxyReg:
63 // invalid number of results; expected 2, got 1
64 return;
65 }
66
68}
#define MAKE_CASE(V)
bool isTargetMemoryOpcode(unsigned Opcode) const override
Returns true if a node with the given target-specific opcode has a memory operand.
const char * getTargetNodeName(unsigned Opcode) const override
Returns the name of the given target-specific opcode, suitable for debug printing.
void verifyTargetNode(const SelectionDAG &DAG, const SDNode *N) const override
Checks that the given target-specific node is valid. Aborts if it is not.
Represents one node in the SelectionDAG.
const char * getTargetNodeName(unsigned Opcode) const override
Returns the name of the given target-specific opcode, suitable for debug printing.
SelectionDAGGenTargetInfo(const SDNodeInfo &GenNodeInfo)
bool isTargetMemoryOpcode(unsigned Opcode) const override
Returns true if a node with the given target-specific opcode has a memory operand.
void verifyTargetNode(const SelectionDAG &DAG, const SDNode *N) const override
Checks that the given target-specific node is valid. Aborts if it is not.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
@ ATOMIC_CMP_SWAP_B128
These nodes are used to lower atomic instructions with i128 type.
This is an optimization pass for GlobalISel generic memory operations.
#define N