[llvm-commits] [llvm] r162339 - in /llvm/trunk: lib/Target/Mips/MipsDelaySlotFiller.cpp test/CodeGen/Mips/brdelayslot.ll test/CodeGen/Mips/tls-alias.ll test/CodeGen/Mips/tls.ll test/MC/Mips/elf-N64.ll test/MC/Mips/mips64shift.ll test/MC/Mips/multi-64bit-func.ll
Akira Hatanaka
ahatanaka at mips.com
Tue Aug 21 19:51:28 PDT 2012
Author: ahatanak
Date: Tue Aug 21 21:51:28 2012
New Revision: 162339
URL: http://llvm.org/viewvc/llvm-project?rev=162339&view=rev
Log:
Add option disable-mips-delay-filler. Turn on mips' delay slot filler by
default.
Patch by Carl Norum.
Modified:
llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
llvm/trunk/test/CodeGen/Mips/brdelayslot.ll
llvm/trunk/test/CodeGen/Mips/tls-alias.ll
llvm/trunk/test/CodeGen/Mips/tls.ll
llvm/trunk/test/MC/Mips/elf-N64.ll
llvm/trunk/test/MC/Mips/mips64shift.ll
llvm/trunk/test/MC/Mips/multi-64bit-func.ll
Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Tue Aug 21 21:51:28 2012
@@ -30,10 +30,11 @@
STATISTIC(UsefulSlots, "Number of delay slots filled with instructions that"
" are not NOP.");
-static cl::opt<bool> EnableDelaySlotFiller(
- "enable-mips-delay-filler",
+static cl::opt<bool> DisableDelaySlotFiller(
+ "disable-mips-delay-filler",
cl::init(false),
- cl::desc("Fill the Mips delay slots useful instructions."),
+ cl::desc("Disable the delay slot filler, which attempts to fill the Mips"
+ "delay slots with useful instructions."),
cl::Hidden);
// This option can be used to silence complaints by machine verifier passes.
@@ -114,7 +115,7 @@
InstrIter D;
- if (EnableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
+ if (!DisableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
MBB.splice(llvm::next(I), &MBB, D);
++UsefulSlots;
} else
Modified: llvm/trunk/test/CodeGen/Mips/brdelayslot.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/brdelayslot.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/brdelayslot.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/brdelayslot.ll Tue Aug 21 21:51:28 2012
@@ -1,4 +1,4 @@
-; RUN: llc -march=mipsel -enable-mips-delay-filler < %s | FileCheck %s
+; RUN: llc -march=mipsel < %s | FileCheck %s
define void @foo1() nounwind {
entry:
Modified: llvm/trunk/test/CodeGen/Mips/tls-alias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/tls-alias.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/tls-alias.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/tls-alias.ll Tue Aug 21 21:51:28 2012
@@ -1,4 +1,4 @@
-; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s
+; RUN: llc -march=mipsel -relocation-model=pic -disable-mips-delay-filler < %s | FileCheck %s
@foo = thread_local global i32 42
@bar = hidden alias i32* @foo
Modified: llvm/trunk/test/CodeGen/Mips/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/tls.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/tls.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/tls.ll Tue Aug 21 21:51:28 2012
@@ -1,8 +1,10 @@
-; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=PIC
-; RUN: llc -march=mipsel -relocation-model=static < %s \
-; RUN: | FileCheck %s -check-prefix=STATIC
-; RUN: llc -march=mipsel -relocation-model=static < %s \
-; RUN: -mips-fix-global-base-reg=false | FileCheck %s -check-prefix=STATICGP
+; RUN: llc -march=mipsel -disable-mips-delay-filler < %s | \
+; RUN: FileCheck %s -check-prefix=PIC
+; RUN: llc -march=mipsel -relocation-model=static -disable-mips-delay-filler < \
+; RUN: %s | FileCheck %s -check-prefix=STATIC
+; RUN: llc -march=mipsel -relocation-model=static -disable-mips-delay-filler \
+; RUN: -mips-fix-global-base-reg=false < %s | \
+; RUN: FileCheck %s -check-prefix=STATICGP
@t1 = thread_local global i32 0, align 4
Modified: llvm/trunk/test/MC/Mips/elf-N64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/elf-N64.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/elf-N64.ll (original)
+++ llvm/trunk/test/MC/Mips/elf-N64.ll Tue Aug 21 21:51:28 2012
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -disable-mips-delay-filler %s -o - | elf-dump --dump-section-data | FileCheck %s
; Check for N64 relocation production.
;
Modified: llvm/trunk/test/MC/Mips/mips64shift.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips64shift.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips64shift.ll (original)
+++ llvm/trunk/test/MC/Mips/mips64shift.ll Tue Aug 21 21:51:28 2012
@@ -1,4 +1,4 @@
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
+; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -disable-mips-delay-filler %s -o - | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
define i64 @f3(i64 %a0) nounwind readnone {
Modified: llvm/trunk/test/MC/Mips/multi-64bit-func.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/multi-64bit-func.ll?rev=162339&r1=162338&r2=162339&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/multi-64bit-func.ll (original)
+++ llvm/trunk/test/MC/Mips/multi-64bit-func.ll Tue Aug 21 21:51:28 2012
@@ -1,8 +1,8 @@
; There is no real check here. If the test doesn't
; assert it passes.
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s
+; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -disable-mips-delay-filler < %s
; Run it again without extra nop in delay slot
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -enable-mips-delay-filler < %s
+; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s
define i32 @bosco1(i32 %x) nounwind readnone {
entry:
More information about the llvm-commits
mailing list