summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjashook <jashoo@microsoft.com>2017-01-19 14:15:43 -0800
committerjashook <jashoo@microsoft.com>2017-01-19 16:33:27 -0800
commit5d0305399e59d81dc210f2ebe56fc9d314ff2bd0 (patch)
treecffc614c3fd39bea3821e85a0809c2cdd7aff198
parent0d04afc8f5919edcbb371c1e0c4f832f76aed09f (diff)
downloadcoreclr-5d0305399e59d81dc210f2ebe56fc9d314ff2bd0.tar.gz
coreclr-5d0305399e59d81dc210f2ebe56fc9d314ff2bd0.tar.bz2
coreclr-5d0305399e59d81dc210f2ebe56fc9d314ff2bd0.zip
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.
-rw-r--r--src/jit/flowgraph.cpp1
-rw-r--r--src/jit/morph.cpp3
2 files changed, 4 insertions, 0 deletions
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();