Have HexagonSelectionDAGInfo take a DataLayout rather than a
authorEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 00:18:25 +0000 (00:18 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 27 Jun 2014 00:18:25 +0000 (00:18 +0000)
target machine since that's all it needs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp
lib/Target/Hexagon/HexagonSelectionDAGInfo.h
lib/Target/Hexagon/HexagonTargetMachine.cpp

index f66ffd2..b5db997 100644 (file)
@@ -18,8 +18,8 @@ using namespace llvm;
 
 bool llvm::flag_aligned_memcpy;
 
-HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const HexagonTargetMachine &TM)
-    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
+HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const DataLayout &DL)
+    : TargetSelectionDAGInfo(&DL) {}
 
 HexagonSelectionDAGInfo::~HexagonSelectionDAGInfo() {
 }
index 8ba6108..b40b303 100644 (file)
 
 namespace llvm {
 
-class HexagonTargetMachine;
-
 class HexagonSelectionDAGInfo : public TargetSelectionDAGInfo {
 public:
-  explicit HexagonSelectionDAGInfo(const HexagonTargetMachine &TM);
+  explicit HexagonSelectionDAGInfo(const DataLayout &DL);
   ~HexagonSelectionDAGInfo();
 
   SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl,
index 35cf253..40c06f6 100644 (file)
@@ -71,7 +71,7 @@ HexagonTargetMachine::HexagonTargetMachine(const Target &T, StringRef TT,
                                            CodeGenOpt::Level OL)
     : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
       DL("e-m:e-p:32:32-i1:32-i64:64-a:0-n32"), Subtarget(TT, CPU, FS),
-      InstrInfo(Subtarget), TLInfo(*this), TSInfo(*this),
+      InstrInfo(Subtarget), TLInfo(*this), TSInfo(DL),
       FrameLowering() {
     initAsmInfo();
 }