LLVM  14.0.0git
WebAssemblyRegisterInfo.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
17 
18 #define GET_REGINFO_HEADER
19 #include "WebAssemblyGenRegisterInfo.inc"
20 
21 namespace llvm {
22 
23 class MachineFunction;
24 class RegScavenger;
25 class TargetRegisterClass;
26 class Triple;
27 
29  const Triple &TT;
30 
31 public:
32  explicit WebAssemblyRegisterInfo(const Triple &TT);
33 
34  // Code Generation virtual methods.
35  const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
36  BitVector getReservedRegs(const MachineFunction &MF) const override;
38  unsigned FIOperandNum,
39  RegScavenger *RS = nullptr) const override;
40 
41  // Debug information queries.
42  Register getFrameRegister(const MachineFunction &MF) const override;
43 
44  const TargetRegisterClass *
46  unsigned Kind = 0) const override;
47  // This does not apply to wasm.
48  const uint32_t *getNoPreservedMask() const override { return nullptr; }
49 };
50 
51 } // end namespace llvm
52 
53 #endif
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::WebAssemblyRegisterInfo::getNoPreservedMask
const uint32_t * getNoPreservedMask() const override
Definition: WebAssemblyRegisterInfo.h:48
llvm::WebAssemblyRegisterInfo::getCalleeSavedRegs
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Definition: WebAssemblyRegisterInfo.cpp:39
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::WebAssemblyRegisterInfo::eliminateFrameIndex
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
Definition: WebAssemblyRegisterInfo.cpp:53
llvm::WebAssemblyRegisterInfo::WebAssemblyRegisterInfo
WebAssemblyRegisterInfo(const Triple &TT)
Definition: WebAssemblyRegisterInfo.cpp:35
llvm::WebAssemblyRegisterInfo
Definition: WebAssemblyRegisterInfo.h:28
llvm::TargetRegisterClass
Definition: TargetRegisterInfo.h:46
llvm::BitVector
Definition: BitVector.h:74
llvm::WebAssemblyRegisterInfo::getPointerRegClass
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const override
Definition: WebAssemblyRegisterInfo.cpp:153
llvm::WebAssemblyRegisterInfo::getFrameRegister
Register getFrameRegister(const MachineFunction &MF) const override
Definition: WebAssemblyRegisterInfo.cpp:139
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::MachineFunction
Definition: MachineFunction.h:234
uint32_t
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
uint16_t
llvm::WebAssemblyRegisterInfo::getReservedRegs
BitVector getReservedRegs(const MachineFunction &MF) const override
Definition: WebAssemblyRegisterInfo.cpp:45
WebAssemblyGenRegisterInfo
llvm::MachineInstrBundleIterator< MachineInstr >