1 //===-- Mips16RegisterInfo.cpp - MIPS16 Register Information -== ----------===//
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 //===----------------------------------------------------------------------===//
10 // This file contains the MIPS16 implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #include "Mips16RegisterInfo.h"
16 #include "MipsAnalyzeImmediate.h"
17 #include "MipsInstrInfo.h"
18 #include "MipsSubtarget.h"
19 #include "MipsMachineFunction.h"
20 #include "llvm/Constants.h"
21 #include "llvm/DebugInfo.h"
22 #include "llvm/Type.h"
23 #include "llvm/Function.h"
24 #include "llvm/CodeGen/ValueTypes.h"
25 #include "llvm/CodeGen/MachineInstrBuilder.h"
26 #include "llvm/CodeGen/MachineFunction.h"
27 #include "llvm/CodeGen/MachineFrameInfo.h"
28 #include "llvm/Target/TargetFrameLowering.h"
29 #include "llvm/Target/TargetMachine.h"
30 #include "llvm/Target/TargetOptions.h"
31 #include "llvm/Target/TargetInstrInfo.h"
32 #include "llvm/Support/CommandLine.h"
33 #include "llvm/Support/Debug.h"
34 #include "llvm/Support/ErrorHandling.h"
35 #include "llvm/Support/raw_ostream.h"
36 #include "llvm/ADT/BitVector.h"
37 #include "llvm/ADT/STLExtras.h"
41 Mips16RegisterInfo::Mips16RegisterInfo(const MipsSubtarget &ST,
42 const TargetInstrInfo &TII)
43 : MipsRegisterInfo(ST, TII) {}
45 // This function eliminate ADJCALLSTACKDOWN,
46 // ADJCALLSTACKUP pseudo instructions
47 void Mips16RegisterInfo::
48 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
49 MachineBasicBlock::iterator I) const {
50 // Simply discard ADJCALLSTACKDOWN, ADJCALLSTACKUP instructions.
54 void Mips16RegisterInfo::eliminateFI(MachineBasicBlock::iterator II,
55 unsigned OpNo, int FrameIndex,
57 int64_t SPOffset) const {