mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Simplify target construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de1cce7e14
commit
c4fa386471
@ -33,8 +33,7 @@ namespace {
|
||||
/// TargetMachine ctor - Create an ILP32 architecture model
|
||||
///
|
||||
ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("ARM"), DataLayout("E-p:32:32"),
|
||||
FrameInfo() {
|
||||
: DataLayout("E-p:32:32") {
|
||||
}
|
||||
|
||||
unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
|
@ -54,7 +54,7 @@ unsigned AlphaTargetMachine::getJITMatchQuality() {
|
||||
}
|
||||
|
||||
AlphaTargetMachine::AlphaTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("alpha"), DataLayout("e"),
|
||||
: DataLayout("e"),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
JITInfo(*this),
|
||||
Subtarget(M, FS)
|
||||
|
@ -23,7 +23,7 @@ struct CTargetMachine : public TargetMachine {
|
||||
const TargetData DataLayout; // Calculates type size & alignment
|
||||
|
||||
CTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("CBackend", M), DataLayout(&M) {}
|
||||
: DataLayout(&M) {}
|
||||
|
||||
// This is the only thing that actually does anything here.
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
|
@ -71,7 +71,7 @@ unsigned IA64TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
/// IA64TargetMachine ctor - Create an LP64 architecture model
|
||||
///
|
||||
IA64TargetMachine::IA64TargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("IA64"), DataLayout("e"),
|
||||
: DataLayout("e"),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
TLInfo(*this) { // FIXME? check this stuff
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ unsigned PPC64TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
|
||||
PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS,
|
||||
bool is64Bit)
|
||||
: TargetMachine("PowerPC"), Subtarget(M, FS, is64Bit),
|
||||
: Subtarget(M, FS, is64Bit),
|
||||
DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
|
||||
FrameInfo(*this, false), JITInfo(*this, is64Bit), TLInfo(*this),
|
||||
InstrItins(Subtarget.getInstrItineraryData()) {
|
||||
|
@ -31,7 +31,7 @@ namespace {
|
||||
/// SparcTargetMachine ctor - Create an ILP32 architecture model
|
||||
///
|
||||
SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("Sparc"), DataLayout("E-p:32:32"),
|
||||
: DataLayout("E-p:32:32"),
|
||||
Subtarget(M, FS), InstrInfo(Subtarget),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
|
||||
}
|
||||
|
@ -95,10 +95,6 @@ namespace {
|
||||
// TargetMachine Class
|
||||
//
|
||||
|
||||
TargetMachine::TargetMachine(const std::string &name, const Module &M)
|
||||
: Name(name) {
|
||||
}
|
||||
|
||||
TargetMachine::~TargetMachine() {
|
||||
}
|
||||
|
||||
|
@ -68,9 +68,7 @@ unsigned X86TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
/// X86TargetMachine ctor - Create an ILP32 architecture model
|
||||
///
|
||||
X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS)
|
||||
: TargetMachine("X86"),
|
||||
Subtarget(M, FS),
|
||||
DataLayout("e-p:32:32-d:32-l:32"),
|
||||
: Subtarget(M, FS), DataLayout("e-p:32:32-d:32-l:32"),
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown,
|
||||
Subtarget.getStackAlignment(), -4),
|
||||
InstrInfo(*this), JITInfo(*this), TLInfo(*this) {
|
||||
|
Loading…
Reference in New Issue
Block a user