1 //===-- VEISelLowering.h - VE DAG Lowering Interface ------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines the interfaces that VE uses to lower LLVM code into a
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_VE_VEISELLOWERING_H
15 #define LLVM_LIB_TARGET_VE_VEISELLOWERING_H
18 #include "llvm/CodeGen/TargetLowering.h"
24 enum NodeType : unsigned {
25 FIRST_NUMBER = ISD::BUILTIN_OP_END,
26 RET_FLAG, // Return with a flag operand.
30 class VETargetLowering : public TargetLowering {
31 const VESubtarget *Subtarget;
34 VETargetLowering(const TargetMachine &TM, const VESubtarget &STI);
36 const char *getTargetNodeName(unsigned Opcode) const override;
38 Register getRegisterByName(const char *RegName, LLT VT,
39 const MachineFunction &MF) const override;
41 /// getSetCCResultType - Return the ISD::SETCC ValueType
42 EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context,
43 EVT VT) const override;
45 SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv,
47 const SmallVectorImpl<ISD::InputArg> &Ins,
48 const SDLoc &dl, SelectionDAG &DAG,
49 SmallVectorImpl<SDValue> &InVals) const override;
51 bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
53 const SmallVectorImpl<ISD::OutputArg> &ArgsFlags,
54 LLVMContext &Context) const override;
55 SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
56 const SmallVectorImpl<ISD::OutputArg> &Outs,
57 const SmallVectorImpl<SDValue> &OutVals, const SDLoc &dl,
58 SelectionDAG &DAG) const override;
62 #endif // VE_ISELLOWERING_H