Revert "ART: Removes SuspendCheck for plain loops with a low trip count."
This reverts commit 3de02fb67de386368c9fe39ab5a0133afcf1d785.
Reason for revert: b/201413752
Change-Id: I8a3a56cfb81fa88f49992615696260dfbc79bb67
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h
index 0ca16b5..d3583ed 100644
--- a/compiler/optimizing/loop_optimization.h
+++ b/compiler/optimizing/loop_optimization.h
@@ -47,11 +47,6 @@
static constexpr const char* kLoopOptimizationPassName = "loop_optimization";
- // The maximum number of total instructions (trip_count * instruction_count),
- // where the optimization of removing SuspendChecks from the loop header could
- // be performed.
- static constexpr int64_t kMaxTotalInstRemoveSuspendCheck = 128;
-
private:
/**
* A single loop inside the loop hierarchy representation.
@@ -168,19 +163,8 @@
// should be actually applied.
bool TryFullUnrolling(LoopAnalysisInfo* analysis_info, bool generate_code = true);
- // Tries to remove SuspendCheck for plain loops with a low trip count. The
- // SuspendCheck in the codegen makes sure that the thread can be interrupted
- // during execution for GC. Not being able to do so might decrease the
- // responsiveness of GC when a very long loop or a long recursion is being
- // executed. However, for plain loops with a small trip count, the removal of
- // SuspendCheck should not affect the GC's responsiveness by a large margin.
- // Consequently, since the thread won't be interrupted for plain loops, it is
- // assumed that the performance might increase by removing SuspendCheck.
- bool TryToRemoveSuspendCheckFromLoopHeader(LoopAnalysisInfo* analysis_info,
- bool generate_code = true);
-
- // Tries to apply scalar loop optimizations.
- bool TryLoopScalarOpts(LoopNode* node);
+ // Tries to apply scalar loop peeling and unrolling.
+ bool TryPeelingAndUnrolling(LoopNode* node);
//
// Vectorization analysis and synthesis.