LLVM API Documentation
00001 //===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 /// \file 00011 /// \brief Interface to describe a layout of a stack frame on a AMDIL target 00012 /// machine. 00013 // 00014 //===----------------------------------------------------------------------===// 00015 #ifndef LLVM_LIB_TARGET_R600_AMDGPUFRAMELOWERING_H 00016 #define LLVM_LIB_TARGET_R600_AMDGPUFRAMELOWERING_H 00017 00018 #include "llvm/CodeGen/MachineFunction.h" 00019 #include "llvm/Target/TargetFrameLowering.h" 00020 00021 namespace llvm { 00022 00023 /// \brief Information about the stack frame layout on the AMDGPU targets. 00024 /// 00025 /// It holds the direction of the stack growth, the known stack alignment on 00026 /// entry to each function, and the offset to the locals area. 00027 /// See TargetFrameInfo for more comments. 00028 class AMDGPUFrameLowering : public TargetFrameLowering { 00029 public: 00030 AMDGPUFrameLowering(StackDirection D, unsigned StackAl, int LAO, 00031 unsigned TransAl = 1); 00032 virtual ~AMDGPUFrameLowering(); 00033 00034 /// \returns The number of 32-bit sub-registers that are used when storing 00035 /// values to the stack. 00036 unsigned getStackWidth(const MachineFunction &MF) const; 00037 int getFrameIndexOffset(const MachineFunction &MF, int FI) const override; 00038 const SpillSlot * 00039 getCalleeSavedSpillSlots(unsigned &NumEntries) const override; 00040 void emitPrologue(MachineFunction &MF) const override; 00041 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; 00042 bool hasFP(const MachineFunction &MF) const override; 00043 }; 00044 } // namespace llvm 00045 #endif