[llvm] r210549 - Move AArch64FrameLowering into the subtarget.

Eric Christopher echristo at gmail.com
Tue Jun 10 10:44:13 PDT 2014


Author: echristo
Date: Tue Jun 10 12:44:12 2014
New Revision: 210549

URL: http://llvm.org/viewvc/llvm-project?rev=210549&view=rev
Log:
Move AArch64FrameLowering into the subtarget.

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=210549&r1=210548&r2=210549&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp Tue Jun 10 12:44:12 2014
@@ -36,7 +36,7 @@ AArch64Subtarget::AArch64Subtarget(const
     : AArch64GenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others),
       HasFPARMv8(false), HasNEON(false), HasCrypto(false), HasCRC(false),
       HasZeroCycleRegMove(false), HasZeroCycleZeroing(false), CPUString(CPU),
-      TargetTriple(TT), IsLittleEndian(LittleEndian) {
+      TargetTriple(TT), IsLittleEndian(LittleEndian), FrameLowering() {
   // 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=210549&r1=210548&r2=210549&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h Tue Jun 10 12:44:12 2014
@@ -14,8 +14,9 @@
 #ifndef AArch64SUBTARGET_H
 #define AArch64SUBTARGET_H
 
-#include "llvm/Target/TargetSubtargetInfo.h"
+#include "AArch64FrameLowering.h"
 #include "AArch64RegisterInfo.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
 #include <string>
 
 #define GET_SUBTARGETINFO_HEADER
@@ -52,12 +53,18 @@ protected:
   /// IsLittleEndian - Is the target little endian?
   bool IsLittleEndian;
 
+  AArch64FrameLowering FrameLowering;
+
 public:
   /// This constructor initializes the data members to match that
   /// of the specified triple.
   AArch64Subtarget(const std::string &TT, const std::string &CPU,
                  const std::string &FS, bool LittleEndian);
 
+  const AArch64FrameLowering *getFrameLowering() const {
+    return &FrameLowering;
+  }
+
   bool enableMachineScheduler() const override { return true; }
 
   bool hasZeroCycleRegMove() const { return HasZeroCycleRegMove; }

Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp?rev=210549&r1=210548&r2=210549&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp Tue Jun 10 12:44:12 2014
@@ -85,7 +85,7 @@ AArch64TargetMachine::AArch64TargetMachi
              ? "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")),
-      InstrInfo(Subtarget), TLInfo(*this), FrameLowering(), TSInfo(*this) {
+      InstrInfo(Subtarget), TLInfo(*this), TSInfo(*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=210549&r1=210548&r2=210549&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h Tue Jun 10 12:44:12 2014
@@ -33,7 +33,6 @@ private:
   const DataLayout DL;
   AArch64InstrInfo InstrInfo;
   AArch64TargetLowering TLInfo;
-  AArch64FrameLowering FrameLowering;
   AArch64SelectionDAGInfo TSInfo;
 
 public:
@@ -50,7 +49,7 @@ public:
   }
   const DataLayout *getDataLayout() const override { return &DL; }
   const AArch64FrameLowering *getFrameLowering() const override {
-    return &FrameLowering;
+    return getSubtargetImpl()->getFrameLowering();
   }
   const AArch64InstrInfo *getInstrInfo() const override { return &InstrInfo; }
   const AArch64RegisterInfo *getRegisterInfo() const override {





More information about the llvm-commits mailing list