1 // WebAssemblyRegisterInfo.h - WebAssembly Register Information Impl -*- C++ -*-
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file contains the WebAssembly implementation of the
12 /// WebAssemblyRegisterInfo class.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H
19 #define GET_REGINFO_HEADER
20 #include "WebAssemblyGenRegisterInfo.inc"
24 class MachineFunction;
26 class TargetRegisterClass;
29 class WebAssemblyRegisterInfo final : public WebAssemblyGenRegisterInfo {
33 explicit WebAssemblyRegisterInfo(const Triple &TT);
35 // Code Generation virtual methods.
36 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
37 BitVector getReservedRegs(const MachineFunction &MF) const override;
38 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
39 unsigned FIOperandNum,
40 RegScavenger *RS = nullptr) const override;
42 // Debug information queries.
43 unsigned getFrameRegister(const MachineFunction &MF) const override;
45 const TargetRegisterClass *
46 getPointerRegClass(const MachineFunction &MF,
47 unsigned Kind = 0) const override;
50 } // end namespace llvm