From d96a246e5b103bfc167acaa6315bd8abca9de493 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 23 Mar 2016 16:01:47 +0000 Subject: Optimizing: Do not insert suspend checks on back-edges. Rely on HGraph::SimplifyLoop() to insert suspend checks. CodeGenerator's CheckLoopEntriesCanBeUsedForOsr() checks the dex pcs of suspend checks against branch targets to verify that we always have an appropriate point for OSR transition. However, the HSuspendChecks that were added by HGraphBuilder to support the recently removed "baseline" interfered with this in a specific case, namely an infinite loop where the back-branch jumps to a nop. In that case, the HSuspendCheck added by HGraphBuilder had a dex pc different from the block and the branch target but its presence would stop the HGraph::SimplifyLoop() from adding a new HSuspendCheck with the correct dex pc. Bug: 27623547 Change-Id: I83566a260210bc05aea0c44509a39bb490aa7003 --- compiler/optimizing/builder.h | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index e3dd0e8216..48f5316222 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -133,7 +133,6 @@ class HGraphBuilder : public ValueObject { HLocal* GetLocalAt(uint32_t register_index) const; void UpdateLocal(uint32_t register_index, HInstruction* instruction, uint32_t dex_pc) const; HInstruction* LoadLocal(uint32_t register_index, Primitive::Type type, uint32_t dex_pc) const; - void PotentiallyAddSuspendCheck(HBasicBlock* target, uint32_t dex_pc); void InitializeParameters(uint16_t number_of_parameters); // Returns whether the current method needs access check for the type. -- cgit v1.2.3-59-g8ed1b