forked from OSchip/llvm-project
pass the TargetTriple down from each target ctor to the
LLVMTargetMachine ctor. It is currently unused. llvm-svn: 78711
This commit is contained in:
parent
67e5ea2726
commit
2c30970b22
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "llvm/Target/TargetInstrItineraries.h"
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -290,7 +291,8 @@ public:
|
|||
///
|
||||
class LLVMTargetMachine : public TargetMachine {
|
||||
protected: // Can only create subclasses.
|
||||
LLVMTargetMachine(const Target &T) : TargetMachine(T) { }
|
||||
LLVMTargetMachine(const Target &T, const std::string &TargetTriple)
|
||||
: TargetMachine(T) { }
|
||||
|
||||
/// addCommonCodeGenPasses - Add standard LLVM codegen passes used for
|
||||
/// both emitting to assembly files or machine code output.
|
||||
|
|
|
@ -39,7 +39,7 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T,
|
|||
const std::string &TT,
|
||||
const std::string &FS,
|
||||
bool isThumb)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS, isThumb),
|
||||
FrameInfo(Subtarget),
|
||||
JITInfo(),
|
||||
|
|
|
@ -31,7 +31,7 @@ const TargetAsmInfo *AlphaTargetMachine::createTargetAsmInfo() const {
|
|||
|
||||
AlphaTargetMachine::AlphaTargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
DataLayout("e-f128:128:128"),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
JITInfo(*this),
|
||||
|
|
|
@ -29,7 +29,7 @@ const TargetAsmInfo* BlackfinTargetMachine::createTargetAsmInfo() const {
|
|||
BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
|
||||
const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
DataLayout("e-p:32:32-i64:32-f64:32"),
|
||||
Subtarget(TT, FS),
|
||||
TLInfo(*this),
|
||||
|
|
|
@ -39,7 +39,7 @@ const TargetAsmInfo *SPUTargetMachine::createTargetAsmInfo() const {
|
|||
|
||||
SPUTargetMachine::SPUTargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS),
|
||||
DataLayout(Subtarget.getTargetDataString()),
|
||||
InstrInfo(*this),
|
||||
|
|
|
@ -22,7 +22,7 @@ using namespace llvm;
|
|||
MSP430TargetMachine::MSP430TargetMachine(const Target &T,
|
||||
const std::string &TT,
|
||||
const std::string &FS) :
|
||||
LLVMTargetMachine(T),
|
||||
LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS),
|
||||
// FIXME: Check TargetData string.
|
||||
DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"),
|
||||
|
|
|
@ -38,14 +38,13 @@ const TargetAsmInfo *MipsTargetMachine::createTargetAsmInfo() const {
|
|||
MipsTargetMachine::
|
||||
MipsTargetMachine(const Target &T, const std::string &TT, const std::string &FS,
|
||||
bool isLittle=false):
|
||||
LLVMTargetMachine(T),
|
||||
LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS, isLittle),
|
||||
DataLayout(isLittle ? std::string("e-p:32:32:32-i8:8:32-i16:16:32") :
|
||||
std::string("E-p:32:32:32-i8:8:32-i16:16:32")),
|
||||
InstrInfo(*this),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0),
|
||||
TLInfo(*this)
|
||||
{
|
||||
TLInfo(*this) {
|
||||
// Abicall enables PIC by default
|
||||
if (getRelocationModel() == Reloc::Default) {
|
||||
if (Subtarget.isABI_O32())
|
||||
|
|
|
@ -23,7 +23,7 @@ using namespace llvm;
|
|||
// PIC16TargetMachine - Traditional PIC16 Machine.
|
||||
PIC16TargetMachine::PIC16TargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS, bool Cooper)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS, Cooper),
|
||||
DataLayout("e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"),
|
||||
InstrInfo(*this), TLInfo(*this),
|
||||
|
|
|
@ -29,13 +29,12 @@ extern "C" void LLVMInitializePowerPCTarget() {
|
|||
const TargetAsmInfo *PPCTargetMachine::createTargetAsmInfo() const {
|
||||
if (Subtarget.isDarwin())
|
||||
return new PPCDarwinTargetAsmInfo(*this);
|
||||
else
|
||||
return new PPCLinuxTargetAsmInfo(*this);
|
||||
}
|
||||
|
||||
PPCTargetMachine::PPCTargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS, bool is64Bit)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS, is64Bit),
|
||||
DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
|
||||
FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this),
|
||||
|
|
|
@ -31,7 +31,7 @@ const TargetAsmInfo *SparcTargetMachine::createTargetAsmInfo() const {
|
|||
///
|
||||
SparcTargetMachine::SparcTargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
DataLayout("E-p:32:32-f128:128:128"),
|
||||
Subtarget(TT, FS), TLInfo(*this), InstrInfo(Subtarget),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
|
||||
|
|
|
@ -31,7 +31,7 @@ const TargetAsmInfo *SystemZTargetMachine::createTargetAsmInfo() const {
|
|||
SystemZTargetMachine::SystemZTargetMachine(const Target &T,
|
||||
const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS),
|
||||
DataLayout("E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-i64:64:64-f32:32:32"
|
||||
"-f64:64:64-f128:128:128-a0:16:16"),
|
||||
|
|
|
@ -58,7 +58,7 @@ X86_64TargetMachine::X86_64TargetMachine(const Target &T, const std::string &TT,
|
|||
///
|
||||
X86TargetMachine::X86TargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS, bool is64Bit)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS, is64Bit),
|
||||
DataLayout(Subtarget.getDataLayout()),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown,
|
||||
|
|
|
@ -25,7 +25,7 @@ const TargetAsmInfo *XCoreTargetMachine::createTargetAsmInfo() const {
|
|||
///
|
||||
XCoreTargetMachine::XCoreTargetMachine(const Target &T, const std::string &TT,
|
||||
const std::string &FS)
|
||||
: LLVMTargetMachine(T),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS),
|
||||
DataLayout("e-p:32:32:32-a0:0:32-f32:32:32-f64:32:32-i1:8:32-i8:8:32-"
|
||||
"i16:16:32-i32:32:32-i64:32:32"),
|
||||
|
|
Loading…
Reference in New Issue