#include "NVPTX.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class NVPTXPrologEpilogPass : public MachineFunctionPass { … };
}
MachineFunctionPass *llvm::createNVPTXPrologEpilogPass() { … }
char NVPTXPrologEpilogPass::ID = …;
bool NVPTXPrologEpilogPass::runOnMachineFunction(MachineFunction &MF) { … }
static inline void AdjustStackOffset(MachineFrameInfo &MFI, int FrameIdx,
bool StackGrowsDown, int64_t &Offset,
Align &MaxAlign) { … }
void
NVPTXPrologEpilogPass::calculateFrameObjectOffsets(MachineFunction &Fn) { … }