summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_unit_test.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-09-16 15:19:06 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-09-16 15:19:06 +0000
commitbace0378d720a1d2938ec7f6be17e2814671d20a (patch)
treed986e10ad92b40e38f9098c486e12891b0ec4118 /compiler/optimizing/optimizing_unit_test.h
parent5733b35c23792834f3a2374003c109301a48867c (diff)
parentfbc695f9b8e2084697e19c1355ab925f99f0d235 (diff)
Merge "Revert "Revert "Implement suspend checks in new compiler."""
Diffstat (limited to 'compiler/optimizing/optimizing_unit_test.h')
-rw-r--r--compiler/optimizing/optimizing_unit_test.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h
index 36a6a21d01..c409529727 100644
--- a/compiler/optimizing/optimizing_unit_test.h
+++ b/compiler/optimizing/optimizing_unit_test.h
@@ -48,6 +48,19 @@ LiveInterval* BuildInterval(const size_t ranges[][2],
return interval;
}
+void RemoveSuspendChecks(HGraph* graph) {
+ for (size_t i = 0, e = graph->GetBlocks().Size(); i < e; ++i) {
+ for (HInstructionIterator it(graph->GetBlocks().Get(i)->GetInstructions());
+ !it.Done();
+ it.Advance()) {
+ HInstruction* current = it.Current();
+ if (current->IsSuspendCheck()) {
+ current->GetBlock()->RemoveInstruction(current);
+ }
+ }
+ }
+}
+
} // namespace art
#endif // ART_COMPILER_OPTIMIZING_OPTIMIZING_UNIT_TEST_H_