1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Replace uses of ARMBaseInstrInfo and ARMTargetMachine with the Base versions.

llvm-svn: 153421
This commit is contained in:
Craig Topper 2012-03-25 23:49:58 +00:00
parent 276dad7263
commit 519813bca2
8 changed files with 12 additions and 18 deletions

View File

@ -15,7 +15,6 @@
#include "ARM.h" #include "ARM.h"
#include "ARMBaseInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "ARMFrameLowering.h" #include "ARMFrameLowering.h"
#include "ARMInstrInfo.h"
#include "ARMMachineFunctionInfo.h" #include "ARMMachineFunctionInfo.h"
#include "ARMSubtarget.h" #include "ARMSubtarget.h"
#include "MCTargetDesc/ARMAddressingModes.h" #include "MCTargetDesc/ARMAddressingModes.h"

View File

@ -15,7 +15,7 @@
#define DEBUG_TYPE "jit" #define DEBUG_TYPE "jit"
#include "ARM.h" #include "ARM.h"
#include "ARMConstantPoolValue.h" #include "ARMConstantPoolValue.h"
#include "ARMInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "ARMRelocations.h" #include "ARMRelocations.h"
#include "ARMSubtarget.h" #include "ARMSubtarget.h"
#include "ARMTargetMachine.h" #include "ARMTargetMachine.h"
@ -46,7 +46,7 @@ namespace {
class ARMCodeEmitter : public MachineFunctionPass { class ARMCodeEmitter : public MachineFunctionPass {
ARMJITInfo *JTI; ARMJITInfo *JTI;
const ARMInstrInfo *II; const ARMBaseInstrInfo *II;
const TargetData *TD; const TargetData *TD;
const ARMSubtarget *Subtarget; const ARMSubtarget *Subtarget;
TargetMachine &TM; TargetMachine &TM;
@ -66,7 +66,7 @@ namespace {
public: public:
ARMCodeEmitter(TargetMachine &tm, JITCodeEmitter &mce) ARMCodeEmitter(TargetMachine &tm, JITCodeEmitter &mce)
: MachineFunctionPass(ID), JTI(0), : MachineFunctionPass(ID), JTI(0),
II((const ARMInstrInfo *)tm.getInstrInfo()), II((const ARMBaseInstrInfo *)tm.getInstrInfo()),
TD(tm.getTargetData()), TM(tm), TD(tm.getTargetData()), TM(tm),
MCE(mce), MCPEs(0), MJTEs(0), MCE(mce), MCPEs(0), MJTEs(0),
IsPIC(TM.getRelocationModel() == Reloc::PIC_), IsThumb(false) {} IsPIC(TM.getRelocationModel() == Reloc::PIC_), IsThumb(false) {}
@ -368,9 +368,9 @@ bool ARMCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
assert((MF.getTarget().getRelocationModel() != Reloc::Default || assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
MF.getTarget().getRelocationModel() != Reloc::Static) && MF.getTarget().getRelocationModel() != Reloc::Static) &&
"JIT relocation model must be set to static or default!"); "JIT relocation model must be set to static or default!");
JTI = ((ARMTargetMachine &)MF.getTarget()).getJITInfo(); JTI = ((ARMBaseTargetMachine &)MF.getTarget()).getJITInfo();
II = ((const ARMTargetMachine &)MF.getTarget()).getInstrInfo(); II = (const ARMBaseInstrInfo *)MF.getTarget().getInstrInfo();
TD = ((const ARMTargetMachine &)MF.getTarget()).getTargetData(); TD = MF.getTarget().getTargetData();
Subtarget = &TM.getSubtarget<ARMSubtarget>(); Subtarget = &TM.getSubtarget<ARMSubtarget>();
MCPEs = &MF.getConstantPool()->getConstants(); MCPEs = &MF.getConstantPool()->getConstants();
MJTEs = 0; MJTEs = 0;

View File

@ -16,7 +16,6 @@
#define DEBUG_TYPE "arm-cp-islands" #define DEBUG_TYPE "arm-cp-islands"
#include "ARM.h" #include "ARM.h"
#include "ARMMachineFunctionInfo.h" #include "ARMMachineFunctionInfo.h"
#include "ARMInstrInfo.h"
#include "Thumb2InstrInfo.h" #include "Thumb2InstrInfo.h"
#include "MCTargetDesc/ARMAddressingModes.h" #include "MCTargetDesc/ARMAddressingModes.h"
#include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineConstantPool.h"
@ -266,7 +265,7 @@ namespace {
MachineFunction *MF; MachineFunction *MF;
MachineConstantPool *MCP; MachineConstantPool *MCP;
const ARMInstrInfo *TII; const ARMBaseInstrInfo *TII;
const ARMSubtarget *STI; const ARMSubtarget *STI;
ARMFunctionInfo *AFI; ARMFunctionInfo *AFI;
bool isThumb; bool isThumb;
@ -383,7 +382,7 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) {
<< MCP->getConstants().size() << " CP entries, aligned to " << MCP->getConstants().size() << " CP entries, aligned to "
<< MCP->getConstantPoolAlignment() << " bytes *****\n"); << MCP->getConstantPoolAlignment() << " bytes *****\n");
TII = (const ARMInstrInfo*)MF->getTarget().getInstrInfo(); TII = (const ARMBaseInstrInfo*)MF->getTarget().getInstrInfo();
AFI = MF->getInfo<ARMFunctionInfo>(); AFI = MF->getInfo<ARMFunctionInfo>();
STI = &MF->getTarget().getSubtarget<ARMSubtarget>(); STI = &MF->getTarget().getSubtarget<ARMSubtarget>();

View File

@ -1672,7 +1672,7 @@ llvm::ARMTargetLowering::HandleByVal(CCState *State, unsigned &size) const {
static static
bool MatchingStackOffset(SDValue Arg, unsigned Offset, ISD::ArgFlagsTy Flags, bool MatchingStackOffset(SDValue Arg, unsigned Offset, ISD::ArgFlagsTy Flags,
MachineFrameInfo *MFI, const MachineRegisterInfo *MRI, MachineFrameInfo *MFI, const MachineRegisterInfo *MRI,
const ARMInstrInfo *TII) { const TargetInstrInfo *TII) {
unsigned Bytes = Arg.getValueType().getSizeInBits() / 8; unsigned Bytes = Arg.getValueType().getSizeInBits() / 8;
int FI = INT_MAX; int FI = INT_MAX;
if (Arg.getOpcode() == ISD::CopyFromReg) { if (Arg.getOpcode() == ISD::CopyFromReg) {
@ -1807,8 +1807,7 @@ ARMTargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
// the caller's fixed stack objects. // the caller's fixed stack objects.
MachineFrameInfo *MFI = MF.getFrameInfo(); MachineFrameInfo *MFI = MF.getFrameInfo();
const MachineRegisterInfo *MRI = &MF.getRegInfo(); const MachineRegisterInfo *MRI = &MF.getRegInfo();
const ARMInstrInfo *TII = const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
((ARMTargetMachine&)getTargetMachine()).getInstrInfo();
for (unsigned i = 0, realArgIdx = 0, e = ArgLocs.size(); for (unsigned i = 0, realArgIdx = 0, e = ArgLocs.size();
i != e; i != e;
++i, ++realArgIdx) { ++i, ++realArgIdx) {

View File

@ -18,7 +18,6 @@
#include "ARMBaseInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "ARMRegisterInfo.h" #include "ARMRegisterInfo.h"
#include "ARMSubtarget.h" #include "ARMSubtarget.h"
#include "llvm/Target/TargetInstrInfo.h"
namespace llvm { namespace llvm {
class ARMSubtarget; class ARMSubtarget;

View File

@ -13,7 +13,7 @@
#define DEBUG_TYPE "jit" #define DEBUG_TYPE "jit"
#include "ARMJITInfo.h" #include "ARMJITInfo.h"
#include "ARMInstrInfo.h" #include "ARM.h"
#include "ARMConstantPoolValue.h" #include "ARMConstantPoolValue.h"
#include "ARMRelocations.h" #include "ARMRelocations.h"
#include "ARMSubtarget.h" #include "ARMSubtarget.h"

View File

@ -17,7 +17,6 @@
#include "ARM.h" #include "ARM.h"
#include "ARMBaseInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "Thumb1RegisterInfo.h" #include "Thumb1RegisterInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
namespace llvm { namespace llvm {
class ARMSubtarget; class ARMSubtarget;

View File

@ -15,9 +15,8 @@
#define THUMB2INSTRUCTIONINFO_H #define THUMB2INSTRUCTIONINFO_H
#include "ARM.h" #include "ARM.h"
#include "ARMInstrInfo.h" #include "ARMBaseInstrInfo.h"
#include "Thumb2RegisterInfo.h" #include "Thumb2RegisterInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
namespace llvm { namespace llvm {
class ARMSubtarget; class ARMSubtarget;