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 f66ffd284a930f7919aa0a940cd1bf2062b78679..b5db997eb1b88913efe33b80441d9849b1c33121 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 8ba6108bdfad7c951eb0eb7fdd8494f518fbde05..b40b30320cf1bedc3ad6c4804f287cb2c436c75c 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 35cf253f0ba1a584279031079ab14e20df881ec2..40c06f61fd5370225ce742a6175d7db07b828ffc 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();
 }