2008-11-07 10:59:00 +00:00
|
|
|
//===-- XCoreTargetMachine.h - Define TargetMachine for XCore ---*- 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 XCore specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
|
|
|
|
#define LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "XCoreSubtarget.h"
|
2012-03-17 18:46:09 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class XCoreTargetMachine : public LLVMTargetMachine {
|
2014-11-13 09:26:31 +00:00
|
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
2008-11-07 10:59:00 +00:00
|
|
|
XCoreSubtarget Subtarget;
|
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
XCoreTargetMachine(const Target &T, StringRef TT,
|
2011-12-02 22:16:29 +00:00
|
|
|
StringRef CPU, StringRef FS, const TargetOptions &Options,
|
2011-11-16 08:38:26 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2014-11-20 23:37:18 +00:00
|
|
|
~XCoreTargetMachine() override;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2015-03-21 04:22:23 +00:00
|
|
|
const XCoreSubtarget *getSubtargetImpl() const { return &Subtarget; }
|
|
|
|
const XCoreSubtarget *getSubtargetImpl(const Function &) const override {
|
|
|
|
return &Subtarget;
|
|
|
|
}
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
// Pass Pipeline Configuration
|
2014-04-29 07:57:00 +00:00
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
2013-09-18 12:43:35 +00:00
|
|
|
|
2015-02-01 13:20:00 +00:00
|
|
|
TargetIRAnalysis getTargetIRAnalysis() override;
|
2014-11-13 09:26:31 +00:00
|
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
|
|
return TLOF.get();
|
|
|
|
}
|
2008-11-07 10:59:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|