1 //===--- NVPTXFrameLowering.h - Define frame lowering for NVPTX -*- 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 // 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTXFRAMELOWERING_H 14 #define LLVM_LIB_TARGET_NVPTX_NVPTXFRAMELOWERING_H 15 16 #include "llvm/CodeGen/TargetFrameLowering.h" 17 #include "llvm/Support/TypeSize.h" 18 19 namespace llvm { 20 21 class NVPTXFrameLowering : public TargetFrameLowering { 22 public: 23 explicit NVPTXFrameLowering(); 24 25 void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override; 26 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; 27 StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, 28 Register &FrameReg) const override; 29 30 MachineBasicBlock::iterator 31 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, 32 MachineBasicBlock::iterator I) const override; 33 DwarfFrameBase getDwarfFrameBase(const MachineFunction &MF) const override; 34 35 protected: 36 bool hasFPImpl(const MachineFunction &MF) const override; 37 }; 38 39 } // End llvm namespace 40 41 #endif 42