brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · e69696b Raw
62 lines · c
1//===-- AVRRegisterInfo.h - AVR 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// This file contains the AVR implementation of the TargetRegisterInfo class.10//11//===----------------------------------------------------------------------===//12 13#ifndef LLVM_AVR_REGISTER_INFO_H14#define LLVM_AVR_REGISTER_INFO_H15 16#include "llvm/CodeGen/TargetRegisterInfo.h"17 18#define GET_REGINFO_HEADER19#include "AVRGenRegisterInfo.inc"20 21namespace llvm {22 23/// Utilities relating to AVR registers.24class AVRRegisterInfo : public AVRGenRegisterInfo {25public:26  AVRRegisterInfo();27 28public:29  const uint16_t *30  getCalleeSavedRegs(const MachineFunction *MF = nullptr) const override;31  const uint32_t *getCallPreservedMask(const MachineFunction &MF,32                                       CallingConv::ID CC) const override;33  BitVector getReservedRegs(const MachineFunction &MF) const override;34 35  const TargetRegisterClass *36  getLargestLegalSuperClass(const TargetRegisterClass *RC,37                            const MachineFunction &MF) const override;38 39  /// Stack Frame Processing Methods40  bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,41                           unsigned FIOperandNum,42                           RegScavenger *RS = nullptr) const override;43 44  Register getFrameRegister(const MachineFunction &MF) const override;45 46  const TargetRegisterClass *47  getPointerRegClass(unsigned Kind = 0) const override;48 49  /// Splits a 16-bit `DREGS` register into the lo/hi register pair.50  /// \param Reg A 16-bit register to split.51  void splitReg(Register Reg, Register &LoReg, Register &HiReg) const;52 53  bool shouldCoalesce(MachineInstr *MI, const TargetRegisterClass *SrcRC,54                      unsigned SubReg, const TargetRegisterClass *DstRC,55                      unsigned DstSubReg, const TargetRegisterClass *NewRC,56                      LiveIntervals &LIS) const override;57};58 59} // end namespace llvm60 61#endif // LLVM_AVR_REGISTER_INFO_H62