Enable checking of GTF_EXCEPT and GTF_ASG flags. (#13668)
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 1 Sep 2017 04:29:51 +0000 (21:29 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Sep 2017 04:29:51 +0000 (21:29 -0700)
commit8a338880b527a86ccd33c29b1aa7baccd3f4b998
tree88d92a502a5668a075211741a5063dffd023fb7e
parent8a036ea897835e72ba4f0c0fbe4fa2198b850e1f
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.
19 files changed:
src/jit/assertionprop.cpp
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/compiler.hpp
src/jit/copyprop.cpp
src/jit/decomposelongs.cpp
src/jit/earlyprop.cpp
src/jit/flowgraph.cpp
src/jit/gentree.cpp
src/jit/gentree.h
src/jit/importer.cpp
src/jit/liveness.cpp
src/jit/loopcloning.cpp
src/jit/lower.cpp
src/jit/morph.cpp
src/jit/optimizer.cpp
src/jit/rangecheck.cpp
src/jit/simd.cpp
src/jit/utils.cpp