2011-12-12 21:14:40 +00:00
|
|
|
//=-- HexagonTargetMachine.h - Define TargetMachine for Hexagon ---*- C++ -*-=//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the Hexagon specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef HexagonTARGETMACHINE_H
|
|
|
|
#define HexagonTARGETMACHINE_H
|
|
|
|
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "HexagonInstrInfo.h"
|
|
|
|
#include "HexagonSubtarget.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class Module;
|
|
|
|
|
|
|
|
class HexagonTargetMachine : public LLVMTargetMachine {
|
|
|
|
HexagonSubtarget Subtarget;
|
|
|
|
|
|
|
|
public:
|
|
|
|
HexagonTargetMachine(const Target &T, StringRef TT,StringRef CPU,
|
2012-03-17 09:24:09 +00:00
|
|
|
StringRef FS, const TargetOptions &Options,
|
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2011-12-12 21:14:40 +00:00
|
|
|
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonInstrInfo *getInstrInfo() const override {
|
2014-06-27 00:27:40 +00:00
|
|
|
return getSubtargetImpl()->getInstrInfo();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonSubtarget *getSubtargetImpl() const override {
|
2011-12-12 21:14:40 +00:00
|
|
|
return &Subtarget;
|
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonRegisterInfo *getRegisterInfo() const override {
|
2014-06-27 00:27:40 +00:00
|
|
|
return getSubtargetImpl()->getRegisterInfo();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const InstrItineraryData* getInstrItineraryData() const override {
|
2014-06-27 00:13:43 +00:00
|
|
|
return &getSubtargetImpl()->getInstrItineraryData();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonTargetLowering* getTargetLowering() const override {
|
2014-06-27 00:27:40 +00:00
|
|
|
return getSubtargetImpl()->getTargetLowering();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonFrameLowering* getFrameLowering() const override {
|
2014-06-27 00:27:40 +00:00
|
|
|
return getSubtargetImpl()->getFrameLowering();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
2014-04-29 07:58:16 +00:00
|
|
|
const HexagonSelectionDAGInfo* getSelectionDAGInfo() const override {
|
2014-06-27 00:27:40 +00:00
|
|
|
return getSubtargetImpl()->getSelectionDAGInfo();
|
|
|
|
}
|
|
|
|
const DataLayout *getDataLayout() const override {
|
|
|
|
return getSubtargetImpl()->getDataLayout();
|
2011-12-12 21:14:40 +00:00
|
|
|
}
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
|
2014-04-29 07:58:16 +00:00
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
2011-12-12 21:14:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bool flag_aligned_memcpy;
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|