[llvm-commits] [llvm] r75096 - /llvm/trunk/lib/Target/X86/X86TargetMachine.cpp

Chris Lattner sabre at nondot.org
Wed Jul 8 20:40:30 PDT 2009


Author: lattner
Date: Wed Jul  8 22:40:30 2009
New Revision: 75096

URL: http://llvm.org/viewvc/llvm-project?rev=75096&view=rev
Log:
.o file writing shouldn't mess around with pic/relo models like the JIT does.

Modified:
    llvm/trunk/lib/Target/X86/X86TargetMachine.cpp

Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=75096&r1=75095&r2=75096&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Wed Jul  8 22:40:30 2009
@@ -305,24 +305,6 @@
                                       CodeGenOpt::Level OptLevel,
                                       bool DumpAsm,
                                       ObjectCodeEmitter &OCE) {
-  // FIXME: Move this to TargetJITInfo!
-  // On Darwin, do not override 64-bit setting made in X86TargetMachine().
-  if (DefRelocModel == Reloc::Default && 
-      (!Subtarget.isTargetDarwin() || !Subtarget.is64Bit())) {
-    setRelocationModel(Reloc::Static);
-    Subtarget.setPICStyle(PICStyles::None);
-  }
-  
-  // 64-bit JIT places everything in the same buffer except external functions.
-  // On Darwin, use small code model but hack the call instruction for 
-  // externals.  Elsewhere, do not assume globals are in the lower 4G.
-  if (Subtarget.is64Bit()) {
-    if (Subtarget.isTargetDarwin())
-      setCodeModel(CodeModel::Small);
-    else
-      setCodeModel(CodeModel::Large);
-  }
-
   PM.add(createX86ObjectCodeEmitterPass(*this, OCE));
   if (DumpAsm) {
     assert(AsmPrinterCtor && "AsmPrinter was not linked in");





More information about the llvm-commits mailing list