Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
[llvm-complete.git] / lib / Target / WebAssembly / WebAssemblyRegisterInfo.h
blob7880eb217dbf3913cf6b60bb21cf2957e3cd7785
1 // WebAssemblyRegisterInfo.h - WebAssembly Register Information Impl -*- 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 /// \file
10 /// This file contains the WebAssembly implementation of the
11 /// WebAssemblyRegisterInfo class.
12 ///
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
18 #define GET_REGINFO_HEADER
19 #include "WebAssemblyGenRegisterInfo.inc"
21 namespace llvm {
23 class MachineFunction;
24 class RegScavenger;
25 class TargetRegisterClass;
26 class Triple;
28 class WebAssemblyRegisterInfo final : public WebAssemblyGenRegisterInfo {
29 const Triple &TT;
31 public:
32 explicit WebAssemblyRegisterInfo(const Triple &TT);
34 // Code Generation virtual methods.
35 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
36 BitVector getReservedRegs(const MachineFunction &MF) const override;
37 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
38 unsigned FIOperandNum,
39 RegScavenger *RS = nullptr) const override;
41 // Debug information queries.
42 Register getFrameRegister(const MachineFunction &MF) const override;
44 const TargetRegisterClass *
45 getPointerRegClass(const MachineFunction &MF,
46 unsigned Kind = 0) const override;
47 // This does not apply to wasm.
48 const uint32_t *getNoPreservedMask() const override { return nullptr; }
51 } // end namespace llvm
53 #endif