2006-02-05 06:50:24 +01:00
|
|
|
//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 21:36:04 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-02-05 06:50:24 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the Sparc specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 18:26:38 +02:00
|
|
|
#ifndef LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
|
|
|
|
#define LLVM_LIB_TARGET_SPARC_SPARCTARGETMACHINE_H
|
2006-02-05 06:50:24 +01:00
|
|
|
|
2012-12-04 08:12:27 +01:00
|
|
|
#include "SparcInstrInfo.h"
|
2010-11-15 01:06:54 +01:00
|
|
|
#include "SparcSubtarget.h"
|
2012-12-04 08:12:27 +01:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2006-02-05 06:50:24 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
class SparcTargetMachine : public LLVMTargetMachine {
|
2014-11-13 10:26:31 +01:00
|
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
2016-05-23 12:56:36 +02:00
|
|
|
SparcSubtarget Subtarget;
|
2016-05-18 11:14:13 +02:00
|
|
|
bool is64Bit;
|
|
|
|
mutable StringMap<std::unique_ptr<SparcSubtarget>> SubtargetMap;
|
2006-02-05 06:50:24 +01:00
|
|
|
public:
|
2015-06-11 21:41:26 +02:00
|
|
|
SparcTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
|
|
|
StringRef FS, const TargetOptions &Options,
|
2016-05-19 00:04:49 +02:00
|
|
|
Optional<Reloc::Model> RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL, bool is64bit);
|
2014-11-21 00:37:18 +01:00
|
|
|
~SparcTargetMachine() override;
|
2006-02-05 06:50:24 +01:00
|
|
|
|
2016-05-23 12:56:36 +02:00
|
|
|
const SparcSubtarget *getSubtargetImpl() const { return &Subtarget; }
|
2016-05-18 11:14:13 +02:00
|
|
|
const SparcSubtarget *getSubtargetImpl(const Function &) const override;
|
2014-08-06 00:10:21 +02:00
|
|
|
|
2006-09-04 06:14:57 +02:00
|
|
|
// Pass Pipeline Configuration
|
2014-04-29 09:57:13 +02:00
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
2014-11-13 10:26:31 +01:00
|
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
|
|
return TLOF.get();
|
|
|
|
}
|
2006-02-05 06:50:24 +01:00
|
|
|
};
|
|
|
|
|
2016-05-18 18:00:24 +02:00
|
|
|
/// Sparc 32-bit target machine
|
2010-02-04 07:34:01 +01:00
|
|
|
///
|
|
|
|
class SparcV8TargetMachine : public SparcTargetMachine {
|
2011-12-20 03:50:00 +01:00
|
|
|
virtual void anchor();
|
2010-02-04 07:34:01 +01:00
|
|
|
public:
|
2015-06-11 21:41:26 +02:00
|
|
|
SparcV8TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
|
|
|
StringRef FS, const TargetOptions &Options,
|
2016-05-19 00:04:49 +02:00
|
|
|
Optional<Reloc::Model> RM, CodeModel::Model CM,
|
2011-11-16 09:38:26 +01:00
|
|
|
CodeGenOpt::Level OL);
|
2010-02-04 07:34:01 +01:00
|
|
|
};
|
|
|
|
|
2016-05-18 18:00:24 +02:00
|
|
|
/// Sparc 64-bit target machine
|
2010-02-04 07:34:01 +01:00
|
|
|
///
|
|
|
|
class SparcV9TargetMachine : public SparcTargetMachine {
|
2011-12-20 03:50:00 +01:00
|
|
|
virtual void anchor();
|
2010-02-04 07:34:01 +01:00
|
|
|
public:
|
2015-06-11 21:41:26 +02:00
|
|
|
SparcV9TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
2015-04-29 22:30:57 +02:00
|
|
|
StringRef FS, const TargetOptions &Options,
|
2016-05-19 00:04:49 +02:00
|
|
|
Optional<Reloc::Model> RM, CodeModel::Model CM,
|
2015-04-29 22:30:57 +02:00
|
|
|
CodeGenOpt::Level OL);
|
|
|
|
};
|
|
|
|
|
|
|
|
class SparcelTargetMachine : public SparcTargetMachine {
|
|
|
|
virtual void anchor();
|
|
|
|
|
|
|
|
public:
|
2015-06-11 21:41:26 +02:00
|
|
|
SparcelTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
2015-04-29 22:30:57 +02:00
|
|
|
StringRef FS, const TargetOptions &Options,
|
2016-05-19 00:04:49 +02:00
|
|
|
Optional<Reloc::Model> RM, CodeModel::Model CM,
|
2011-11-16 09:38:26 +01:00
|
|
|
CodeGenOpt::Level OL);
|
2010-02-04 07:34:01 +01:00
|
|
|
};
|
|
|
|
|
2006-02-05 06:50:24 +01:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|