Path: blob/main/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVFrameLowering.h
35267 views
//===-- SPIRVFrameLowering.h - Define frame lowering for SPIR-V -*- C++-*--===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This class implements SPIRV-specific bits of TargetFrameLowering class.9// The target uses only virtual registers. It does not operate with stack frame10// explicitly and does not generate prologues/epilogues of functions.11// As a result, we are not required to implemented the frame lowering12// functionality substantially.13//14//===----------------------------------------------------------------------===//1516#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H17#define LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H1819#include "llvm/CodeGen/TargetFrameLowering.h"20#include "llvm/Support/Alignment.h"2122namespace llvm {23class SPIRVSubtarget;2425class SPIRVFrameLowering : public TargetFrameLowering {26public:27explicit SPIRVFrameLowering(const SPIRVSubtarget &sti)28: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(8), 0) {}2930void emitPrologue(MachineFunction &MF,31MachineBasicBlock &MBB) const override {}32void emitEpilogue(MachineFunction &MF,33MachineBasicBlock &MBB) const override {}3435bool hasFP(const MachineFunction &MF) const override { return false; }36};37} // namespace llvm38#endif // LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H394041