From 211c2119dc8932bdb264fae858adba6c0541ce3c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 24 Sep 2015 16:52:33 +0100 Subject: Optimizing: Rewrite DCE's MarkReachableBlocks(). Replace a recursive implementation with a loop using a work list to avoid stack overflow that we would presumably hit for 702-LargeBranchOffset in host debug build with -O0, once the DCE block elimination is enabled for methods containing try-catch. Bug: 24133462 Change-Id: I41288ba368722bcb5d68259c7c147552c8928099 --- compiler/optimizing/nodes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index d79852c17b..6b0ccf8690 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2409,7 +2409,7 @@ class HCurrentMethod : public HExpression<0> { // will be the block containing the next Dex opcode. class HPackedSwitch : public HTemplateInstruction<1> { public: - HPackedSwitch(int32_t start_value, int32_t num_entries, HInstruction* input, + HPackedSwitch(int32_t start_value, uint32_t num_entries, HInstruction* input, uint32_t dex_pc = kNoDexPc) : HTemplateInstruction(SideEffects::None(), dex_pc), start_value_(start_value), @@ -2421,7 +2421,7 @@ class HPackedSwitch : public HTemplateInstruction<1> { int32_t GetStartValue() const { return start_value_; } - int32_t GetNumEntries() const { return num_entries_; } + uint32_t GetNumEntries() const { return num_entries_; } HBasicBlock* GetDefaultBlock() const { // Last entry is the default block. @@ -2431,7 +2431,7 @@ class HPackedSwitch : public HTemplateInstruction<1> { private: int32_t start_value_; - int32_t num_entries_; + uint32_t num_entries_; DISALLOW_COPY_AND_ASSIGN(HPackedSwitch); }; -- cgit v1.2.3-59-g8ed1b