LLVM  16.0.0git
SPIRVFrameLowering.h
Go to the documentation of this file.
1 //===-- SPIRVFrameLowering.h - Define frame lowering for SPIR-V -*- 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 class implements SPIRV-specific bits of TargetFrameLowering class.
10 // The target uses only virtual registers. It does not operate with stack frame
11 // explicitly and does not generate prologues/epilogues of functions.
12 // As a result, we are not required to implemented the frame lowering
13 // functionality substantially.
14 //
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H
18 #define LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H
19 
21 #include "llvm/Support/Alignment.h"
22 
23 namespace llvm {
24 class SPIRVSubtarget;
25 
27 public:
28  explicit SPIRVFrameLowering(const SPIRVSubtarget &sti)
30 
32  MachineBasicBlock &MBB) const override {}
34  MachineBasicBlock &MBB) const override {}
35 
36  bool hasFP(const MachineFunction &MF) const override { return false; }
37 };
38 } // namespace llvm
39 #endif // LLVM_LIB_TARGET_SPIRV_SPIRVFRAMELOWERING_H
llvm::SPIRVFrameLowering::hasFP
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
Definition: SPIRVFrameLowering.h:36
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
TargetFrameLowering.h
llvm::TargetFrameLowering
Information about stack frame layout on the target.
Definition: TargetFrameLowering.h:43
llvm::SPIRVFrameLowering
Definition: SPIRVFrameLowering.h:26
llvm::SPIRVSubtarget
Definition: SPIRVSubtarget.h:35
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:94
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::SPIRVFrameLowering::SPIRVFrameLowering
SPIRVFrameLowering(const SPIRVSubtarget &sti)
Definition: SPIRVFrameLowering.h:28
llvm::SPIRVFrameLowering::emitEpilogue
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Definition: SPIRVFrameLowering.h:33
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
Alignment.h
llvm::SPIRVFrameLowering::emitPrologue
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Definition: SPIRVFrameLowering.h:31
llvm::TargetFrameLowering::StackGrowsDown
@ StackGrowsDown
Definition: TargetFrameLowering.h:47