LLVM 23.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
21namespace llvm {
22
23class MachineFunction;
24class RegScavenger;
25class MCRegisterClass;
26using TargetRegisterClass = MCRegisterClass;
27class Triple;
28
30 const Triple &TT;
31
32public:
33 explicit WebAssemblyRegisterInfo(const Triple &TT);
34
35 // Code Generation virtual methods.
36 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
37 BitVector getReservedRegs(const MachineFunction &MF) const override;
39 unsigned FIOperandNum,
40 RegScavenger *RS = nullptr) const override;
41
42 // Debug information queries.
43 Register getFrameRegister(const MachineFunction &MF) const override;
44
46 getPointerRegClass(unsigned Kind = 0) const override;
47 // This does not apply to wasm.
48 const uint32_t *getNoPreservedMask() const override { return nullptr; }
49
51 const MachineOperand &MO, const MachineRegisterInfo &MRI) const override;
52};
53
54} // end namespace llvm
55
56#endif
IRTranslator LLVM IR MI
MachineInstrBundleIterator< MachineInstr > iterator
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Wrapper class representing virtual and physical registers.
Definition Register.h:20
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
const TargetRegisterClass * getConstrainedRegClassForOperand(const MachineOperand &MO, const MachineRegisterInfo &MRI) const override
bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
Register getFrameRegister(const MachineFunction &MF) const override
BitVector getReservedRegs(const MachineFunction &MF) const override
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
const TargetRegisterClass * getPointerRegClass(unsigned Kind=0) const override
const uint32_t * getNoPreservedMask() const override
This is an optimization pass for GlobalISel generic memory operations.
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
Definition MCRegister.h:21
MCRegisterClass TargetRegisterClass
Definition FastISel.h:58