[InstCombine] Signed saturation patterns
[llvm-core.git] / lib / Target / MSP430 / MSP430MachineFunctionInfo.h
blob2b2c8967a749187603c77035ac238a63f05f5046
1 //=== MSP430MachineFunctionInfo.h - MSP430 machine function info -*- C++ -*-==//
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 // This file declares MSP430-specific per-machine-function information.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
16 #include "llvm/CodeGen/MachineFunction.h"
18 namespace llvm {
20 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
21 /// contains private MSP430 target-specific information for each MachineFunction.
22 class MSP430MachineFunctionInfo : public MachineFunctionInfo {
23 virtual void anchor();
25 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
26 /// stack frame in bytes.
27 unsigned CalleeSavedFrameSize;
29 /// ReturnAddrIndex - FrameIndex for return slot.
30 int ReturnAddrIndex;
32 /// VarArgsFrameIndex - FrameIndex for start of varargs area.
33 int VarArgsFrameIndex;
35 /// SRetReturnReg - Some subtargets require that sret lowering includes
36 /// returning the value of the returned struct in a register. This field
37 /// holds the virtual register into which the sret argument is passed.
38 unsigned SRetReturnReg;
40 public:
41 MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {}
43 explicit MSP430MachineFunctionInfo(MachineFunction &MF)
44 : CalleeSavedFrameSize(0), ReturnAddrIndex(0), SRetReturnReg(0) {}
46 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
47 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
49 unsigned getSRetReturnReg() const { return SRetReturnReg; }
50 void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
52 int getRAIndex() const { return ReturnAddrIndex; }
53 void setRAIndex(int Index) { ReturnAddrIndex = Index; }
55 int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}
56 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
59 } // End llvm namespace
61 #endif