[llvm] r210599 - Move AArch64InstrInfo to AArch64Subtarget.
Eric Christopher
echristo at gmail.com
Tue Jun 10 15:57:26 PDT 2014
Author: echristo
Date: Tue Jun 10 17:57:25 2014
New Revision: 210599
URL: http://llvm.org/viewvc/llvm-project?rev=210599&view=rev
Log:
Move AArch64InstrInfo to AArch64Subtarget.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp
llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h
llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h
Modified: llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp?rev=210599&r1=210598&r2=210599&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp Tue Jun 10 17:57:25 2014
@@ -44,7 +44,7 @@ AArch64Subtarget::AArch64Subtarget(const
? "e-m:o-i64:64-i128:128-n32:64-S128"
: (LittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128"
: "E-m:e-i64:64-i128:128-n32:64-S128")),
- FrameLowering(), TSInfo(&DL) {
+ FrameLowering(), InstrInfo(*this), TSInfo(&DL) {
// Determine default and user-specified characteristics
if (CPUString.empty())
Modified: llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h?rev=210599&r1=210598&r2=210599&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h Tue Jun 10 17:57:25 2014
@@ -14,6 +14,7 @@
#ifndef AArch64SUBTARGET_H
#define AArch64SUBTARGET_H
+#include "AArch64InstrInfo.h"
#include "AArch64FrameLowering.h"
#include "AArch64RegisterInfo.h"
#include "AArch64SelectionDAGInfo.h"
@@ -54,6 +55,7 @@ protected:
const DataLayout DL;
AArch64FrameLowering FrameLowering;
+ AArch64InstrInfo InstrInfo;
AArch64SelectionDAGInfo TSInfo;
public:
@@ -66,6 +68,7 @@ public:
const AArch64FrameLowering *getFrameLowering() const {
return &FrameLowering;
}
+ const AArch64InstrInfo *getInstrInfo() const { return &InstrInfo; }
const DataLayout *getDataLayout() const { return &DL; }
bool enableMachineScheduler() const override { return true; }
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp?rev=210599&r1=210598&r2=210599&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp Tue Jun 10 17:57:25 2014
@@ -77,8 +77,7 @@ AArch64TargetMachine::AArch64TargetMachi
CodeGenOpt::Level OL,
bool LittleEndian)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
- Subtarget(TT, CPU, FS, LittleEndian),
- InstrInfo(Subtarget), TLInfo(*this) {
+ Subtarget(TT, CPU, FS, LittleEndian), TLInfo(*this) {
initAsmInfo();
}
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h?rev=210599&r1=210598&r2=210599&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h Tue Jun 10 17:57:25 2014
@@ -30,7 +30,6 @@ protected:
AArch64Subtarget Subtarget;
private:
- AArch64InstrInfo InstrInfo;
AArch64TargetLowering TLInfo;
public:
@@ -51,9 +50,11 @@ public:
const AArch64FrameLowering *getFrameLowering() const override {
return getSubtargetImpl()->getFrameLowering();
}
- const AArch64InstrInfo *getInstrInfo() const override { return &InstrInfo; }
+ const AArch64InstrInfo *getInstrInfo() const override {
+ return getSubtargetImpl()->getInstrInfo();
+ }
const AArch64RegisterInfo *getRegisterInfo() const override {
- return &InstrInfo.getRegisterInfo();
+ return &getInstrInfo()->getRegisterInfo();
}
const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override {
return getSubtargetImpl()->getSelectionDAGInfo();
More information about the llvm-commits
mailing list