From 5d0305399e59d81dc210f2ebe56fc9d314ff2bd0 Mon Sep 17 00:00:00 2001 From: jashook Date: Thu, 19 Jan 2017 14:15:43 -0800 Subject: Fix arm32 build break fgClearFinallyTargetBit requires computePreds to have happened in order to sucessfully leave the bit unset for cases where there are multiple CALLFINALLY / BBJ_ALWAYS pairs that point to the same finally target on ARM. The change adds an assertion to fgClearFinallyTargetBit in addition to disabling the optimization on ARM. --- src/jit/flowgraph.cpp | 1 + src/jit/morph.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index f48daaa511..5deecbadba 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -11658,6 +11658,7 @@ DONE: void Compiler::fgClearFinallyTargetBit(BasicBlock* block) { + assert(fgComputePredsDone); assert((block->bbFlags & BBF_FINALLY_TARGET) != 0); for (flowList* pred = block->bbPreds; pred; pred = pred->flNext) diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 0947f1c28f..67cf985a82 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -16910,6 +16910,8 @@ void Compiler::fgMorph() fgDebugCheckBBlist(false, false); #endif // DEBUG +// RemoveEmptyFinally is disabled on ARM due to github issue #9013 +#ifndef _TARGET_ARM_ fgRemoveEmptyFinally(); EndPhase(PHASE_EMPTY_FINALLY); @@ -16917,6 +16919,7 @@ void Compiler::fgMorph() fgCloneFinally(); EndPhase(PHASE_CLONE_FINALLY); +#endif // _TARGET_ARM_ /* For x64 and ARM64 we need to mark irregular parameters early so that they don't get promoted */ fgMarkImplicitByRefArgs(); -- cgit v1.2.3