diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-03-13 01:20:42 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-13 01:20:42 +0000 |
| commit | 818242bbaf5cf5f826d6ffccf55ce82e561249d9 (patch) | |
| tree | 3c67dc50983c8aadd224c67e97e261e882735fe2 /llvm/lib | |
| parent | b7004fd8893e6979038d8b28944eb9334a84a143 (diff) | |
| download | bcm5719-llvm-818242bbaf5cf5f826d6ffccf55ce82e561249d9.tar.gz bcm5719-llvm-818242bbaf5cf5f826d6ffccf55ce82e561249d9.zip | |
Implement getTargetLowering() or else LSR won't be using ARM specific hooks.
llvm-svn: 35077
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.h | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 0b22c15ba35..3815875b22a 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -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(); diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.h b/llvm/lib/Target/ARM/ARMTargetMachine.h index 7f45fb6b6c0..a50275c675f 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.h +++ b/llvm/lib/Target/ARM/ARMTargetMachine.h @@ -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; |

