brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 3a73ff6 Raw
53 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file contains the WebAssembly implementation of the11/// WebAssemblyRegisterInfo class.12///13//===----------------------------------------------------------------------===//14 15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H16#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYREGISTERINFO_H17 18#define GET_REGINFO_HEADER19#include "WebAssemblyGenRegisterInfo.inc"20 21namespace llvm {22 23class MachineFunction;24class RegScavenger;25class TargetRegisterClass;26class Triple;27 28class WebAssemblyRegisterInfo final : public WebAssemblyGenRegisterInfo {29  const Triple &TT;30 31public: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;37  bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,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 *45  getPointerRegClass(unsigned Kind = 0) const override;46  // This does not apply to wasm.47  const uint32_t *getNoPreservedMask() const override { return nullptr; }48};49 50} // end namespace llvm51 52#endif53