diff options
author | 2014-09-16 15:19:06 +0000 | |
---|---|---|
committer | 2014-09-16 15:19:06 +0000 | |
commit | bace0378d720a1d2938ec7f6be17e2814671d20a (patch) | |
tree | d986e10ad92b40e38f9098c486e12891b0ec4118 /compiler/optimizing/optimizing_unit_test.h | |
parent | 5733b35c23792834f3a2374003c109301a48867c (diff) | |
parent | fbc695f9b8e2084697e19c1355ab925f99f0d235 (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.h | 13 |
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_ |