summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2017-09-13 23:13:25 -0700
committerGitHub <noreply@github.com>2017-09-13 23:13:25 -0700
commit089dd5bda7e724ad6fa60bc0009c9cca128fe902 (patch)
treea40706137faf67abf3cf48effb3340530651d16e
parent7187a02f479187e8ea6692445dbf3649a4f124c0 (diff)
downloadcoreclr-089dd5bda7e724ad6fa60bc0009c9cca128fe902.tar.gz
coreclr-089dd5bda7e724ad6fa60bc0009c9cca128fe902.tar.bz2
coreclr-089dd5bda7e724ad6fa60bc0009c9cca128fe902.zip
JIT: mark part of runtime lookup tree as nonfaulting and invariant (#13953)
An indir in the runtime lookup sequence wasn't marked as nonfaulting so dead context trees could not be entirely cleaned up. Also added invariant since this particular lookup sequence will always return the same result.
-rw-r--r--src/jit/importer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 08ac0d57a3..d06bd49975 100644
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -2028,9 +2028,11 @@ GenTreePtr Compiler::impRuntimeLookupToTree(CORINFO_RESOLVED_TOKEN* pResolvedTok
slot = gtNewLclvNode(slotLclNum, TYP_I_IMPL);
GenTree* add = gtNewOperNode(GT_ADD, TYP_I_IMPL, slot, gtNewIconNode(-1, TYP_I_IMPL));
GenTree* indir = gtNewOperNode(GT_IND, TYP_I_IMPL, add);
+ indir->gtFlags |= GTF_IND_NONFAULTING;
+ indir->gtFlags |= GTF_IND_INVARIANT;
+
slot = gtNewLclvNode(slotLclNum, TYP_I_IMPL);
GenTree* asg = gtNewAssignNode(slot, indir);
-
GenTree* colon = new (this, GT_COLON) GenTreeColon(TYP_VOID, gtNewNothingNode(), asg);
GenTree* qmark = gtNewQmarkNode(TYP_VOID, relop, colon);
impAppendTree(qmark, (unsigned)CHECK_SPILL_NONE, impCurStmtOffs);