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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETMACHINE_H
|
|
|
|
#define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETMACHINE_H
|
2011-12-12 21:14:40 +00:00
|
|
|
|
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 {
|
2014-11-13 09:26:31 +00:00
|
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
2011-12-12 21:14:40 +00:00
|
|
|
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);
|
2014-11-20 23:37:18 +00:00
|
|
|
~HexagonTargetMachine() override;
|
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;
|
|
|
|
}
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
|
2014-04-29 07:58:16 +00:00
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
2014-11-13 09:26:31 +00:00
|
|
|
|
|
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
|
|
return TLOF.get();
|
|
|
|
}
|
2011-12-12 21:14:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bool flag_aligned_memcpy;
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|