LLVM  3.7.0
ThumbRegisterInfo.h
Go to the documentation of this file.
1 //===- ThumbRegisterInfo.h - Thumb Register Information Impl -*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the Thumb implementation of the TargetRegisterInfo
11 // class. With the exception of emitLoadConstPool Thumb2 tracks
12 // ARMBaseRegisterInfo, Thumb1 overloads the functions below.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_ARM_THUMB1REGISTERINFO_H
17 #define LLVM_LIB_TARGET_ARM_THUMB1REGISTERINFO_H
18 
19 #include "ARMBaseRegisterInfo.h"
21 
22 namespace llvm {
23  class ARMSubtarget;
24  class ARMBaseInstrInfo;
25 
27 public:
29 
30  const TargetRegisterClass *
32  const MachineFunction &MF) const override;
33 
34  const TargetRegisterClass *
36  unsigned Kind = 0) const override;
37 
38  /// emitLoadConstPool - Emits a load from constpool to materialize the
39  /// specified immediate.
40  void
42  DebugLoc dl, unsigned DestReg, unsigned SubIdx, int Val,
43  ARMCC::CondCodes Pred = ARMCC::AL, unsigned PredReg = 0,
44  unsigned MIFlags = MachineInstr::NoFlags) const override;
45 
46  // rewrite MI to access 'Offset' bytes from the FP. Update Offset to be
47  // however much remains to be handled. Return 'true' if no further
48  // work is required.
49  bool rewriteFrameIndex(MachineBasicBlock::iterator II, unsigned FrameRegIdx,
50  unsigned FrameReg, int &Offset,
51  const ARMBaseInstrInfo &TII) const;
52  void resolveFrameIndex(MachineInstr &MI, unsigned BaseReg,
53  int64_t Offset) const override;
57  const TargetRegisterClass *RC,
58  unsigned Reg) const override;
60  int SPAdj, unsigned FIOperandNum,
61  RegScavenger *RS = nullptr) const override;
62 };
63 }
64 
65 #endif
void emitLoadConstPool(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, DebugLoc dl, unsigned DestReg, unsigned SubIdx, int Val, ARMCC::CondCodes Pred=ARMCC::AL, unsigned PredReg=0, unsigned MIFlags=MachineInstr::NoFlags) const override
emitLoadConstPool - Emits a load from constpool to materialize the specified immediate.
A debug info location.
Definition: DebugLoc.h:34
bool saveScavengerRegister(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, MachineBasicBlock::iterator &UseMI, const TargetRegisterClass *RC, unsigned Reg) const override
saveScavengerRegister - Spill the register so it can be used by the register scavenger.
const HexagonInstrInfo * TII
Reg
All possible values of the reg field in the ModR/M byte.
void resolveFrameIndex(MachineInstr &MI, unsigned BaseReg, int64_t Offset) const override
bundle_iterator< MachineInstr, instr_iterator > iterator
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
const TargetRegisterClass * getLargestLegalSuperClass(const TargetRegisterClass *RC, const MachineFunction &MF) const override
Representation of each machine instruction.
Definition: MachineInstr.h:51
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind=0) const override
#define I(x, y, z)
Definition: MD5.cpp:54
bool rewriteFrameIndex(MachineBasicBlock::iterator II, unsigned FrameRegIdx, unsigned FrameReg, int &Offset, const ARMBaseInstrInfo &TII) const
const ARM::ArchExtKind Kind