Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
RISCVSelectionDAGInfo.h
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
9#ifndef LLVM_LIB_TARGET_RISCV_RISCVSELECTIONDAGINFO_H
10#define LLVM_LIB_TARGET_RISCV_RISCVSELECTIONDAGINFO_H
11
14
15#define GET_SDNODE_ENUM
16#include "RISCVGenSDNodeInfo.inc"
17
18namespace llvm {
19
20namespace RISCVISD {
21// RISCVISD Node TSFlags
24 HasMaskOpMask = 1 << 1,
25};
26} // namespace RISCVISD
27
29public:
31
33
34 void verifyTargetNode(const SelectionDAG &DAG,
35 const SDNode *N) const override;
36
38 SDValue Chain, SDValue Dst, SDValue Src,
39 SDValue Size, Align Alignment,
40 bool isVolatile, bool AlwaysInline,
41 MachinePointerInfo DstPtrInfo) const override;
42
43 bool hasPassthruOp(unsigned Opcode) const {
44 return GenNodeInfo.getDesc(Opcode).TSFlags & RISCVISD::HasPassthruOpMask;
45 }
46
47 bool hasMaskOp(unsigned Opcode) const {
48 return GenNodeInfo.getDesc(Opcode).TSFlags & RISCVISD::HasMaskOpMask;
49 }
50
51 unsigned getMAccOpcode(unsigned MulOpcode) const {
52 switch (static_cast<RISCVISD::GenNodeType>(MulOpcode)) {
53 default:
54 llvm_unreachable("Unexpected opcode");
55 case RISCVISD::VWMUL_VL:
56 return RISCVISD::VWMACC_VL;
57 case RISCVISD::VWMULU_VL:
58 return RISCVISD::VWMACCU_VL;
59 case RISCVISD::VWMULSU_VL:
60 return RISCVISD::VWMACCSU_VL;
61 }
62 }
63};
64
65} // namespace llvm
66
67#endif // LLVM_LIB_TARGET_RISCV_RISCVSELECTIONDAGINFO_H
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo) const override
Emit target-specific code that performs a memset.
void verifyTargetNode(const SelectionDAG &DAG, const SDNode *N) const override
Checks that the given target-specific node is valid. Aborts if it is not.
bool hasMaskOp(unsigned Opcode) const
unsigned getMAccOpcode(unsigned MulOpcode) const
bool hasPassthruOp(unsigned Opcode) const
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
SelectionDAGGenTargetInfo(const SDNodeInfo &GenNodeInfo)
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
uint32_t SDNodeTSFlags
Definition SDNodeInfo.h:58
#define N
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39
This class contains a discriminated union of information about pointers in memory operands,...