summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsDelaySlotFiller.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-05-14 23:59:17 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-05-14 23:59:17 +0000
commitf9c3f3b8a8702e0d98be5fb9cd5428c49c7164a2 (patch)
treef621abe77a897ec253b0736a3e4ce570feaca474 /lib/Target/Mips/MipsDelaySlotFiller.cpp
parent24b709529f30bf8cb4769eefbfedb4179349fd28 (diff)
downloadllvm-f9c3f3b8a8702e0d98be5fb9cd5428c49c7164a2.tar.gz
llvm-f9c3f3b8a8702e0d98be5fb9cd5428c49c7164a2.tar.bz2
llvm-f9c3f3b8a8702e0d98be5fb9cd5428c49c7164a2.tar.xz
Add a command line option to skip the delay slot filler pass entirely for Mips.
The purpose of this option is to silence error messages issued by machine verifier passes and enable them to run to the end. If this option is not provided, -verify-machineinstrs complains when it discovers there is a non-terminator instruction (an instruction that is in a delay slot) after the first terminator in a basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r--lib/Target/Mips/MipsDelaySlotFiller.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp
index debf2f1b85..382e90bf38 100644
--- a/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -36,6 +36,13 @@ static cl::opt<bool> EnableDelaySlotFiller(
cl::desc("Fill the Mips delay slots useful instructions."),
cl::Hidden);
+// This option can be used to silence complaints by machine verifier passes.
+static cl::opt<bool> SkipDelaySlotFiller(
+ "skip-mips-delay-filler",
+ cl::init(false),
+ cl::desc("Skip MIPS' delay slot filling pass."),
+ cl::Hidden);
+
namespace {
struct Filler : public MachineFunctionPass {
@@ -53,6 +60,9 @@ namespace {
bool runOnMachineBasicBlock(MachineBasicBlock &MBB);
bool runOnMachineFunction(MachineFunction &F) {
+ if (SkipDelaySlotFiller)
+ return false;
+
bool Changed = false;
for (MachineFunction::iterator FI = F.begin(), FE = F.end();
FI != FE; ++FI)