summaryrefslogtreecommitdiff
path: root/src/jit/assertionprop.cpp
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2017-08-31 21:29:51 -0700
committerGitHub <noreply@github.com>2017-08-31 21:29:51 -0700
commit8a338880b527a86ccd33c29b1aa7baccd3f4b998 (patch)
tree88d92a502a5668a075211741a5063dffd023fb7e /src/jit/assertionprop.cpp
parent8a036ea897835e72ba4f0c0fbe4fa2198b850e1f (diff)
downloadcoreclr-8a338880b527a86ccd33c29b1aa7baccd3f4b998.tar.gz
coreclr-8a338880b527a86ccd33c29b1aa7baccd3f4b998.tar.bz2
coreclr-8a338880b527a86ccd33c29b1aa7baccd3f4b998.zip
Enable checking of GTF_EXCEPT and GTF_ASG flags. (#13668)
* Enable checking of GTF_EXCEPT and GTF_ASG flags. fgDebugCheckFlags is modified to check that GTF_EXCEPT and GTF_ASG are set precisely when needed. It's also modified to handle several special operators correctly. fgAddrCouldBeNull is updated to check for handles, implicit byref locals, and stack byrefs. OperMayThrow is modified to handle several operators correctly. GTF_IND_NONFAULTING is reused on operations for which OperIsIndir() is true and on GT_ARR_LENGTH. Various places in morph are updated to set side effect flags correctly. gtUpdateSideEffects is re-written so that it's precise for GTF_ASG and GTF_EXCEPT and conservatively correct for the other side effects. It's now called from more places to keep the flags up-to-date after transformations. NoThrow in HelperCallProperties is updated and GTF_EXCEPT flag is set on helper calls according to that property. optRemoveRangeCheck is cleaned up and simplified.
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r--src/jit/assertionprop.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp
index 9b7bedd87b..ed49e841ea 100644
--- a/src/jit/assertionprop.cpp
+++ b/src/jit/assertionprop.cpp
@@ -3421,7 +3421,7 @@ GenTreePtr Compiler::optAssertionProp_Comma(ASSERT_VALARG_TP assertions, const G
if ((tree->gtGetOp1()->OperGet() == GT_ARR_BOUNDS_CHECK) &&
((tree->gtGetOp1()->gtFlags & GTF_ARR_BOUND_INBND) != 0))
{
- optRemoveRangeCheck(tree, stmt, true, GTF_ASG, true /* force remove */);
+ optRemoveRangeCheck(tree, stmt);
return optAssertionProp_Update(tree, tree, stmt);
}
return nullptr;
@@ -3475,6 +3475,7 @@ GenTreePtr Compiler::optAssertionProp_Ind(ASSERT_VALARG_TP assertions, const Gen
}
#endif
tree->gtFlags &= ~GTF_EXCEPT;
+ tree->gtFlags |= GTF_IND_NONFAULTING;
// Set this flag to prevent reordering
tree->gtFlags |= GTF_ORDER_SIDEEFF;