[llvm] r210853 - Make PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine

Eric Christopher echristo at gmail.com
Thu Jun 12 15:56:49 PDT 2014


Author: echristo
Date: Thu Jun 12 17:56:48 2014
New Revision: 210853

URL: http://llvm.org/viewvc/llvm-project?rev=210853&view=rev
Log:
Make PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine
since that's all it needs.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp
    llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.h
    llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp?rev=210853&r1=210852&r2=210853&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp Thu Jun 12 17:56:48 2014
@@ -16,9 +16,7 @@ using namespace llvm;
 
 #define DEBUG_TYPE "powerpc-selectiondag-info"
 
-PPCSelectionDAGInfo::PPCSelectionDAGInfo(const PPCTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM.getDataLayout()) {
-}
+PPCSelectionDAGInfo::PPCSelectionDAGInfo(const DataLayout *DL)
+    : TargetSelectionDAGInfo(DL) {}
 
-PPCSelectionDAGInfo::~PPCSelectionDAGInfo() {
-}
+PPCSelectionDAGInfo::~PPCSelectionDAGInfo() {}

Modified: llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.h?rev=210853&r1=210852&r2=210853&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSelectionDAGInfo.h Thu Jun 12 17:56:48 2014
@@ -22,7 +22,7 @@ class PPCTargetMachine;
 
 class PPCSelectionDAGInfo : public TargetSelectionDAGInfo {
 public:
-  explicit PPCSelectionDAGInfo(const PPCTargetMachine &TM);
+  explicit PPCSelectionDAGInfo(const DataLayout *DL);
   ~PPCSelectionDAGInfo();
 };
 

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=210853&r1=210852&r2=210853&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Thu Jun 12 17:56:48 2014
@@ -42,7 +42,8 @@ PPCTargetMachine::PPCTargetMachine(const
                                    Reloc::Model RM, CodeModel::Model CM,
                                    CodeGenOpt::Level OL, bool is64Bit)
     : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
-      Subtarget(TT, CPU, FS, *this, is64Bit, OL), TSInfo(*this) {
+      Subtarget(TT, CPU, FS, *this, is64Bit, OL),
+      TSInfo(Subtarget.getDataLayout()) {
   initAsmInfo();
 }
 





More information about the llvm-commits mailing list