Index: src/compiler/instruction.cc |
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
index 3c617327f4614f972837aba787faa73820254081..5f75687df8d2c528d0e73863b86c8904c6e191ef 100644 |
--- a/src/compiler/instruction.cc |
+++ b/src/compiler/instruction.cc |
@@ -120,6 +120,16 @@ bool ParallelMove::IsRedundant() const { |
} |
+bool GapInstruction::IsRedundant() const { |
+ for (int i = GapInstruction::FIRST_INNER_POSITION; |
+ i <= GapInstruction::LAST_INNER_POSITION; i++) { |
+ if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) |
+ return false; |
+ } |
+ return true; |
+} |
+ |
+ |
std::ostream& operator<<(std::ostream& os, |
const PrintableParallelMove& printable) { |
const ParallelMove& pm = *printable.parallel_move_; |