[llvm-exegesis] Fix missing std::move.
[llvm-complete.git] / lib / Target / Nios2 / Nios2ISelLowering.h
blobc3c8179054bb5478c8ed47c43b2c4538596341e8
1 //===-- Nios2ISelLowering.h - Nios2 DAG Lowering Interface ------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the interfaces that Nios2 uses to lower LLVM code into a
11 // selection DAG.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2ISELLOWERING_H
16 #define LLVM_LIB_TARGET_NIOS2_NIOS2ISELLOWERING_H
18 #include "Nios2.h"
19 #include "llvm/CodeGen/TargetLowering.h"
21 namespace llvm {
22 class Nios2Subtarget;
24 namespace Nios2ISD {
25 enum NodeType {
26 // Start the numbering from where ISD NodeType finishes.
27 FIRST_NUMBER = ISD::BUILTIN_OP_END,
29 // Get the Higher 16 bits from a 32-bit immediate
30 // No relation with Nios2 Hi register
31 Hi,
32 // Get the Lower 16 bits from a 32-bit immediate
33 // No relation with Nios2 Lo register
34 Lo,
35 // Return
36 Ret
40 class Nios2TargetLowering : public TargetLowering {
41 const Nios2Subtarget *Subtarget;
43 public:
44 Nios2TargetLowering(const TargetMachine &TM, const Nios2Subtarget &STI);
46 /// getTargetNodeName - This method returns the name of a target specific
47 // DAG node.
48 const char *getTargetNodeName(unsigned Opcode) const override;
50 SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv,
51 bool IsVarArg,
52 const SmallVectorImpl<ISD::InputArg> &Ins,
53 const SDLoc &dl, SelectionDAG &DAG,
54 SmallVectorImpl<SDValue> &InVals) const override;
56 SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
57 const SmallVectorImpl<ISD::OutputArg> &Outs,
58 const SmallVectorImpl<SDValue> &OutVals, const SDLoc &dl,
59 SelectionDAG &DAG) const override;
61 } // end namespace llvm
63 #endif // NIOS2_ISELLOWERING_H