Add option disable-mips-delay-filler. Turn on mips' delay slot filler by
authorAkira Hatanaka <ahatanaka@mips.com>
Wed, 22 Aug 2012 02:51:28 +0000 (02:51 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Wed, 22 Aug 2012 02:51:28 +0000 (02:51 +0000)
default.

Patch by Carl Norum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162339 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 2bba8a38024d3f726a2a705bd90aab8d34fa3f70..8fe3ba6171295e6212790fa26ed979f1282ae372 100644 (file)
@@ -30,10 +30,11 @@ STATISTIC(FilledSlots, "Number of delay slots filled");
 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 @@ runOnMachineBasicBlock(MachineBasicBlock &MBB) {
 
       InstrIter D;
 
-      if (EnableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
+      if (!DisableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
         MBB.splice(llvm::next(I), &MBB, D);
         ++UsefulSlots;
       } else
index b266ce61a8d16a7d4f3cb5b746abed8637f68e7a..d2832da62b96f58d68db6fc9b44c3b7fd9342648 100644 (file)
@@ -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:
index d681091f4c14b6b48b01ac9742ca1702fc2963dd..ce98cc8262239e464a4e060aa26f13b0054d3373 100644 (file)
@@ -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
index a7ddb96e4338289017d9760980042a2987a3d737..72d30dc36912bcfeeb3d3d30bc3c5baa28271047 100644 (file)
@@ -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
 
index 23ec53a2e26daf43474426b776d4c8321644f917..ae6de78d65520e611df8e41e3713ddfa697f98c6 100644 (file)
@@ -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.
 ;
index 7817b96fa594c378da03386f52df4fad9618afec..e1c18576de06a18f0a0de2a8111c7f62fc120700 100644 (file)
@@ -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 {
index 6e0d784e07f64cfbb581aa55decc3b66528a3adf..83577aa1628bd39d921db1977d4c37df44d4b1c8 100644 (file)
@@ -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: