diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-06-22 11:56:01 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-06-22 12:09:16 +0100 |
commit | 1a0a519c82044ec3e6d3910ff0602b11292de47a (patch) | |
tree | 342691a82a58ddb0660b9111622b2ff67d92f898 /compiler/optimizing/loop_optimization.h | |
parent | 8979f71079ec18fa8d3c0915549ec03ee1fbadf5 (diff) |
Fix loop optimization in the presence of environment uses.
We should not remove instructions that have deoptimize as
users, or that have environment uses in a debuggable setup.
bug: 62536525
bug: 33775412
Test: 656-loop-deopt
Change-Id: Iaec1a0b6e90c6a0169f18c6985f00fd8baf2dece
Diffstat (limited to 'compiler/optimizing/loop_optimization.h')
-rw-r--r-- | compiler/optimizing/loop_optimization.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index 75a42f3297..cc6343aeb5 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -161,12 +161,15 @@ class HLoopOptimization : public HOptimization { /*out*/ int32_t* use_count); bool IsUsedOutsideLoop(HLoopInformation* loop_info, HInstruction* instruction); - bool TryReplaceWithLastValue(HInstruction* instruction, HBasicBlock* block); + bool TryReplaceWithLastValue(HLoopInformation* loop_info, + HInstruction* instruction, + HBasicBlock* block); bool TryAssignLastValue(HLoopInformation* loop_info, HInstruction* instruction, HBasicBlock* block, bool collect_loop_uses); void RemoveDeadInstructions(const HInstructionList& list); + bool CanRemoveCycle(); // Whether the current 'iset_' is removable. // Compiler driver (to query ISA features). const CompilerDriver* compiler_driver_; |