Chris Lattner | 7c5a3d3 | 2005-08-16 17:14:42 +0000 | [diff] [blame] | 1 | //===-- PPC32ISelLowering.cpp - PPC32 DAG Lowering Impl. --------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by Chris Lattner and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines the interfaces that PPC uses to lower LLVM code into a |
| 11 | // selection DAG. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H |
| 16 | #define LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H |
| 17 | |
| 18 | #include "llvm/Target/TargetLowering.h" |
| 19 | |
| 20 | namespace llvm { |
| 21 | class PPC32TargetLowering : public TargetLowering { |
| 22 | int VarArgsFrameIndex; // FrameIndex for start of varargs area. |
| 23 | int ReturnAddrIndex; // FrameIndex for return slot. |
| 24 | public: |
| 25 | PPC32TargetLowering(TargetMachine &TM); |
| 26 | |
Chris Lattner | e4bc9ea | 2005-08-26 00:52:45 +0000 | [diff] [blame] | 27 | /// LowerOperation - Provide custom lowering hooks for some operations. |
| 28 | /// |
| 29 | virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG); |
| 30 | |
Chris Lattner | 7c5a3d3 | 2005-08-16 17:14:42 +0000 | [diff] [blame] | 31 | /// LowerArguments - This hook must be implemented to indicate how we should |
| 32 | /// lower the arguments for the specified function, into the specified DAG. |
| 33 | virtual std::vector<SDOperand> |
| 34 | LowerArguments(Function &F, SelectionDAG &DAG); |
| 35 | |
| 36 | /// LowerCallTo - This hook lowers an abstract call to a function into an |
| 37 | /// actual call. |
| 38 | virtual std::pair<SDOperand, SDOperand> |
| 39 | LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg, |
| 40 | unsigned CC, |
| 41 | bool isTailCall, SDOperand Callee, ArgListTy &Args, |
| 42 | SelectionDAG &DAG); |
| 43 | |
| 44 | virtual SDOperand LowerVAStart(SDOperand Chain, SDOperand VAListP, |
| 45 | Value *VAListV, SelectionDAG &DAG); |
| 46 | |
| 47 | virtual std::pair<SDOperand,SDOperand> |
| 48 | LowerVAArg(SDOperand Chain, SDOperand VAListP, Value *VAListV, |
| 49 | const Type *ArgTy, SelectionDAG &DAG); |
| 50 | |
| 51 | virtual std::pair<SDOperand, SDOperand> |
| 52 | LowerFrameReturnAddress(bool isFrameAddr, SDOperand Chain, unsigned Depth, |
| 53 | SelectionDAG &DAG); |
| 54 | }; |
| 55 | } |
| 56 | |
| 57 | #endif // LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H |