Implement getTargetLowering() or else LSR won't be using ARM specific hooks.

llvm-svn: 35077
This commit is contained in:
Evan Cheng 2007-03-13 01:20:42 +00:00
parent b7004fd889
commit 818242bbaf
2 changed files with 8 additions and 1 deletions

View 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();

View 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;