Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVFrameLowering.h
35267 views
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
20
#include "llvm/CodeGen/TargetFrameLowering.h"
21
#include "llvm/Support/Alignment.h"
22
23
namespace llvm {
24
class SPIRVSubtarget;
25
26
class SPIRVFrameLowering : public TargetFrameLowering {
27
public:
28
explicit SPIRVFrameLowering(const SPIRVSubtarget &sti)
29
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(8), 0) {}
30
31
void emitPrologue(MachineFunction &MF,
32
MachineBasicBlock &MBB) const override {}
33
void emitEpilogue(MachineFunction &MF,
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
40
41