[llvm-commits] [llvm] r140863 - in /llvm/trunk: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp test/CodeGen/ARM/fast-isel.ll test/CodeGen/ARM/hidden-vis-2.ll test/CodeGen/ARM/hidden-vis-3.ll test/CodeGen/ARM/tail-opts.ll test/CodeGen/Thumb2/machine-licm.ll
Evan Cheng
evan.cheng at apple.com
Mon Oct 3 15:19:05 PDT 2011
Since you are making this change, can you fix x86_64 as well?
Evan
On Sep 30, 2011, at 10:41 AM, Jim Grosbach wrote:
> Author: grosbach
> Date: Fri Sep 30 12:41:35 2011
> New Revision: 140863
>
> URL: http://llvm.org/viewvc/llvm-project?rev=140863&view=rev
> Log:
> ARM Darwin default relocation model is PIC.
>
> This matches clang, so default options in llc and friends are now closer to
> clang's defaults.
>
> Modified:
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> llvm/trunk/test/CodeGen/ARM/fast-isel.ll
> llvm/trunk/test/CodeGen/ARM/hidden-vis-2.ll
> llvm/trunk/test/CodeGen/ARM/hidden-vis-3.ll
> llvm/trunk/test/CodeGen/ARM/tail-opts.ll
> llvm/trunk/test/CodeGen/Thumb2/machine-licm.ll
>
> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp Fri Sep 30 12:41:35 2011
> @@ -139,8 +139,11 @@
> static MCCodeGenInfo *createARMMCCodeGenInfo(StringRef TT, Reloc::Model RM,
> CodeModel::Model CM) {
> MCCodeGenInfo *X = new MCCodeGenInfo();
> - if (RM == Reloc::Default)
> - RM = Reloc::DynamicNoPIC;
> + if (RM == Reloc::Default) {
> + Triple TheTriple(TT);
> + // Default relocation model on Darwin is PIC, not DynamicNoPIC.
> + RM = TheTriple.isOSDarwin() ? Reloc::PIC_ : Reloc::DynamicNoPIC;
> + }
> X->InitMCCodeGenInfo(RM, CM);
> return X;
> }
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel.ll?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel.ll Fri Sep 30 12:41:35 2011
> @@ -1,5 +1,5 @@
> -; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
> -; RUN: llc < %s -O0 -fast-isel-abort -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
>
> ; Very basic fast-isel functionality.
> define i32 @add(i32 %a, i32 %b) nounwind {
>
> Modified: llvm/trunk/test/CodeGen/ARM/hidden-vis-2.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/hidden-vis-2.ll?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/hidden-vis-2.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/hidden-vis-2.ll Fri Sep 30 12:41:35 2011
> @@ -1,4 +1,4 @@
> -; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s
> +; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=arm-apple-darwin | FileCheck %s
>
> @x = weak hidden global i32 0 ; <i32*> [#uses=1]
>
>
> Modified: llvm/trunk/test/CodeGen/ARM/hidden-vis-3.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/hidden-vis-3.ll?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/hidden-vis-3.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/hidden-vis-3.ll Fri Sep 30 12:41:35 2011
> @@ -1,4 +1,4 @@
> -; RUN: llc < %s -mtriple=arm-apple-darwin9 | FileCheck %s
> +; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=arm-apple-darwin9 | FileCheck %s
>
> @x = external hidden global i32 ; <i32*> [#uses=1]
> @y = extern_weak hidden global i32 ; <i32*> [#uses=1]
>
> Modified: llvm/trunk/test/CodeGen/ARM/tail-opts.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/tail-opts.ll?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/tail-opts.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/tail-opts.ll Fri Sep 30 12:41:35 2011
> @@ -1,4 +1,4 @@
> -; RUN: llc < %s -mtriple=arm-apple-darwin -mcpu=cortex-a8 -asm-verbose=false | FileCheck %s
> +; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic -mcpu=cortex-a8 -asm-verbose=false | FileCheck %s
>
> declare void @bar(i32)
> declare void @car(i32)
>
> Modified: llvm/trunk/test/CodeGen/Thumb2/machine-licm.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/machine-licm.ll?rev=140863&r1=140862&r2=140863&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/Thumb2/machine-licm.ll (original)
> +++ llvm/trunk/test/CodeGen/Thumb2/machine-licm.ll Fri Sep 30 12:41:35 2011
> @@ -1,4 +1,4 @@
> -; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -disable-fp-elim | FileCheck %s
> +; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=dynamic-no-pic -disable-fp-elim | FileCheck %s
> ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim | FileCheck %s --check-prefix=PIC
> ; rdar://7353541
> ; rdar://7354376
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list