From: adam Date: Mon, 3 Nov 2008 10:09:34 +0000 (+0100) Subject: add Context.disableInstructionFifoOverflowCheck() X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b2bd77cebf68e59f9bb108a9b95f0ccbbe954359;p=fleet.git add Context.disableInstructionFifoOverflowCheck() --- diff --git a/src/edu/berkeley/fleet/ir/Context.java b/src/edu/berkeley/fleet/ir/Context.java index 436b49a..8d430ed 100644 --- a/src/edu/berkeley/fleet/ir/Context.java +++ b/src/edu/berkeley/fleet/ir/Context.java @@ -70,6 +70,11 @@ public class Context { * */ public class LoopFactory { + + // FIXME: vet this to see if it is sensible + private boolean instructionFifoSizeCheckDisabled = false; + public void disableInstructionFifoOverflowCheck() { instructionFifoSizeCheckDisabled = true; } + public final Dock dock; public final String friendlyName; public final int count; @@ -295,8 +300,9 @@ public class Context { } if (count==1) { - if (numInstructionsNotIncludingNonblockingPrefix > dock.getInstructionFifoSize()) - throw new RuntimeException("instruction sequence is too long for instruction fifo"); + if (!instructionFifoSizeCheckDisabled && + numInstructionsNotIncludingNonblockingPrefix > dock.getInstructionFifoSize()) + throw new RuntimeException("instruction sequence is too long for instruction fifo at " + dock); } else { if (count != 0) { ic.add(new Instruction.Set(dock, true, Predicate.Default, SetDest.OuterLoopCounter, SetSource.Decrement)); @@ -305,7 +311,8 @@ public class Context { loopSize++; } ic.add(new Instruction.Tail(dock)); - if (loopSize > dock.getInstructionFifoSize()) + if (!instructionFifoSizeCheckDisabled && + loopSize > dock.getInstructionFifoSize()) throw new RuntimeException("instruction loop is too long for instruction fifo"); }