2011-12-13 05:14:40 +08: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 15:12:27 +08:00
|
|
|
#include "HexagonInstrInfo.h"
|
|
|
|
#include "HexagonSubtarget.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class Module;
|
|
|
|
|
|
|
|
class HexagonTargetMachine : public LLVMTargetMachine {
|
|
|
|
HexagonSubtarget Subtarget;
|
|
|
|
|
|
|
|
public:
|
|
|
|
HexagonTargetMachine(const Target &T, StringRef TT,StringRef CPU,
|
2012-03-17 17:24:09 +08:00
|
|
|
StringRef FS, const TargetOptions &Options,
|
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2014-04-29 15:58:16 +08:00
|
|
|
const HexagonSubtarget *getSubtargetImpl() const override {
|
2011-12-13 05:14:40 +08:00
|
|
|
return &Subtarget;
|
|
|
|
}
|
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
|
|
|
|
2014-04-29 15:58:16 +08:00
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
2011-12-13 05:14:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bool flag_aligned_memcpy;
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|