Deleted Added
full compact
X86TargetMachine.cpp (193323) X86TargetMachine.cpp (193574)
1//===-- X86TargetMachine.cpp - Define TargetMachine for the X86 -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 119 unchanged lines hidden (view full) ---

128/// X86TargetMachine ctor - Create an ILP32 architecture model
129///
130X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
131 bool is64Bit)
132 : Subtarget(M, FS, is64Bit),
133 DataLayout(Subtarget.getDataLayout()),
134 FrameInfo(TargetFrameInfo::StackGrowsDown,
135 Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4),
1//===-- X86TargetMachine.cpp - Define TargetMachine for the X86 -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 119 unchanged lines hidden (view full) ---

128/// X86TargetMachine ctor - Create an ILP32 architecture model
129///
130X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
131 bool is64Bit)
132 : Subtarget(M, FS, is64Bit),
133 DataLayout(Subtarget.getDataLayout()),
134 FrameInfo(TargetFrameInfo::StackGrowsDown,
135 Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4),
136 InstrInfo(*this), JITInfo(*this), TLInfo(*this) {
136 InstrInfo(*this), JITInfo(*this), TLInfo(*this),
137 ELFWriterInfo(Subtarget.is64Bit()) {
137 DefRelocModel = getRelocationModel();
138 // FIXME: Correctly select PIC model for Win64 stuff
139 if (getRelocationModel() == Reloc::Default) {
140 if (Subtarget.isTargetDarwin() ||
141 (Subtarget.isTargetCygMing() && !Subtarget.isTargetWin64()))
142 setRelocationModel(Reloc::DynamicNoPIC);
143 else
144 setRelocationModel(Reloc::Static);

--- 63 unchanged lines hidden (view full) ---

208 PM.add(createX86FloatingPointStackifierPass());
209 return true; // -print-machineinstr should print after this.
210}
211
212bool X86TargetMachine::addAssemblyEmitter(PassManagerBase &PM,
213 CodeGenOpt::Level OptLevel,
214 bool Verbose,
215 raw_ostream &Out) {
138 DefRelocModel = getRelocationModel();
139 // FIXME: Correctly select PIC model for Win64 stuff
140 if (getRelocationModel() == Reloc::Default) {
141 if (Subtarget.isTargetDarwin() ||
142 (Subtarget.isTargetCygMing() && !Subtarget.isTargetWin64()))
143 setRelocationModel(Reloc::DynamicNoPIC);
144 else
145 setRelocationModel(Reloc::Static);

--- 63 unchanged lines hidden (view full) ---

209 PM.add(createX86FloatingPointStackifierPass());
210 return true; // -print-machineinstr should print after this.
211}
212
213bool X86TargetMachine::addAssemblyEmitter(PassManagerBase &PM,
214 CodeGenOpt::Level OptLevel,
215 bool Verbose,
216 raw_ostream &Out) {
217 // FIXME: Move this somewhere else!
218 // On Darwin, override 64-bit static relocation to pic_ since the
219 // assembler doesn't support it.
220 if (DefRelocModel == Reloc::Static &&
221 Subtarget.isTargetDarwin() && Subtarget.is64Bit())
222 setRelocationModel(Reloc::PIC_);
223
216 assert(AsmPrinterCtor && "AsmPrinter was not linked in");
217 if (AsmPrinterCtor)
218 PM.add(AsmPrinterCtor(Out, *this, OptLevel, Verbose));
219 return false;
220}
221
222bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM,
223 CodeGenOpt::Level OptLevel,

--- 94 unchanged lines hidden ---
224 assert(AsmPrinterCtor && "AsmPrinter was not linked in");
225 if (AsmPrinterCtor)
226 PM.add(AsmPrinterCtor(Out, *this, OptLevel, Verbose));
227 return false;
228}
229
230bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM,
231 CodeGenOpt::Level OptLevel,

--- 94 unchanged lines hidden ---