Implement getTargetLowering() or else LSR won't be using ARM specific hooks.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 13 Mar 2007 01:20:42 +0000 (01:20 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 13 Mar 2007 01:20:42 +0000 (01:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35077 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.h

index 0b22c15ba35128a51fb7c527e0ec8d1854752879..3815875b22a0b80a71984b7077822308296547a3 100644 (file)
@@ -62,7 +62,8 @@ ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS,
                        "i16:16:32-i8:8:32-i1:8:32-a:0:32") :
            std::string("e-p:32:32-f64:64:64-i64:64:64"))),
     InstrInfo(Subtarget),
-    FrameInfo(Subtarget) {}
+    FrameInfo(Subtarget),
+    TLInfo(*this) {}
 
 unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) {
   std::string TT = M.getTargetTriple();
index 7f45fb6b6c0e2053a6ea0fbf48489414bea23bda..a50275c675f784bf031471e84fe795964b17b8a8 100644 (file)
@@ -21,6 +21,7 @@
 #include "ARMInstrInfo.h"
 #include "ARMFrameInfo.h"
 #include "ARMSubtarget.h"
+#include "ARMISelLowering.h"
 
 namespace llvm {
 
@@ -31,6 +32,8 @@ class ARMTargetMachine : public LLVMTargetMachine {
   const TargetData  DataLayout;       // Calculates type size & alignment
   ARMInstrInfo      InstrInfo;
   ARMFrameInfo      FrameInfo;
+  ARMTargetLowering TLInfo;
+
 public:
   ARMTargetMachine(const Module &M, const std::string &FS, bool isThumb = false);
 
@@ -41,6 +44,9 @@ public:
   }
   virtual const TargetData       *getTargetData() const { return &DataLayout; }
   virtual const ARMSubtarget  *getSubtargetImpl() const { return &Subtarget; }
+  virtual       ARMTargetLowering *getTargetLowering() const { 
+    return const_cast<ARMTargetLowering*>(&TLInfo); 
+  }
   static unsigned getModuleMatchQuality(const Module &M);
 
   virtual const TargetAsmInfo *createTargetAsmInfo() const;