[Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi
Reviewed By: craig.topper
Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>
llvm-svn: 304144
2017-05-29 17:48:30 +08:00
|
|
|
//===-- Nios2TargetMachine.h - Define TargetMachine for Nios2 ---*- 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 Nios2 specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
|
|
|
|
#define LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
|
|
|
|
|
2017-09-19 19:54:29 +08:00
|
|
|
#include "Nios2Subtarget.h"
|
[Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi
Reviewed By: craig.topper
Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>
llvm-svn: 304144
2017-05-29 17:48:30 +08:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2017-10-13 06:57:28 +08:00
|
|
|
class Nios2TargetMachine : public LLVMTargetMachine {
|
2017-09-19 19:54:29 +08:00
|
|
|
mutable StringMap<std::unique_ptr<Nios2Subtarget>> SubtargetMap;
|
2017-12-07 20:35:02 +08:00
|
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
|
|
|
Nios2Subtarget Subtarget;
|
2017-09-19 19:54:29 +08:00
|
|
|
|
[Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi
Reviewed By: craig.topper
Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>
llvm-svn: 304144
2017-05-29 17:48:30 +08:00
|
|
|
public:
|
|
|
|
Nios2TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
|
|
|
StringRef FS, const TargetOptions &Options,
|
2017-09-19 19:54:29 +08:00
|
|
|
Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
|
|
|
|
CodeGenOpt::Level OL, bool JIT);
|
[Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi
Reviewed By: craig.topper
Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>
llvm-svn: 304144
2017-05-29 17:48:30 +08:00
|
|
|
~Nios2TargetMachine() override;
|
2017-09-19 19:54:29 +08:00
|
|
|
|
2017-12-07 20:35:02 +08:00
|
|
|
const Nios2Subtarget *getSubtargetImpl() const { return &Subtarget; }
|
2017-09-19 19:54:29 +08:00
|
|
|
const Nios2Subtarget *getSubtargetImpl(const Function &F) const override;
|
|
|
|
|
2017-12-07 20:35:02 +08:00
|
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
|
|
return TLOF.get();
|
|
|
|
}
|
|
|
|
|
2017-09-19 19:54:29 +08:00
|
|
|
// Pass Pipeline Configuration
|
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
[Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi
Reviewed By: craig.topper
Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>
llvm-svn: 304144
2017-05-29 17:48:30 +08:00
|
|
|
};
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|