diff options
author | 2021-09-28 17:51:17 +0000 | |
---|---|---|
committer | 2021-09-29 12:02:20 +0000 | |
commit | 8f6b99fba2d043265a84d599a967d52f66738ad6 (patch) | |
tree | b4f010fa47b8ae289719c8896da3c42dccb2afe4 /compiler/optimizing/loop_optimization.h | |
parent | a182c9302263114dcf5961e4f3850c21ff7824d5 (diff) |
Revert "ART: Removes SuspendCheck for plain loops with a low trip count."
This reverts commit 3de02fb67de386368c9fe39ab5a0133afcf1d785.
Reason for revert: b/201413752
Change-Id: I8a3a56cfb81fa88f49992615696260dfbc79bb67
Diffstat (limited to 'compiler/optimizing/loop_optimization.h')
-rw-r--r-- | compiler/optimizing/loop_optimization.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index 0ca16b543d..d3583ed8a6 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -47,11 +47,6 @@ class HLoopOptimization : public HOptimization { 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 @@ class HLoopOptimization : public HOptimization { // 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. |