summaryrefslogtreecommitdiff
path: root/src/jit/compiler.h
diff options
context:
space:
mode:
authorJoseph Tremoulet <JCTremoulet@gmail.com>2017-03-21 11:06:24 -0400
committerGitHub <noreply@github.com>2017-03-21 11:06:24 -0400
commit2308976b5db89e692e802ad28605ffe08826e2f6 (patch)
tree4b16682d13db6a8aa12bd2c133c390a2c34d39a2 /src/jit/compiler.h
parentce38ca26fed02c9380946f3056d3159e6a539eac (diff)
parentd6b17aa51b29f756a7aa4061d171636d6da3d030 (diff)
downloadcoreclr-2308976b5db89e692e802ad28605ffe08826e2f6.tar.gz
coreclr-2308976b5db89e692e802ad28605ffe08826e2f6.tar.bz2
coreclr-2308976b5db89e692e802ad28605ffe08826e2f6.zip
Merge pull request #10327 from mikedn/assertion-info
Refactor GenTree assertion information storage
Diffstat (limited to 'src/jit/compiler.h')
-rw-r--r--src/jit/compiler.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h
index ba840ae202..810c404ef5 100644
--- a/src/jit/compiler.h
+++ b/src/jit/compiler.h
@@ -5916,21 +5916,6 @@ public:
}
};
- typedef unsigned short AssertionIndex;
-
- // By default the assertion generated by a GT_JTRUE node holds on the true (bbJumpDest) edge.
- // If the OAE_NEXT_EDGE bit of the assertion index is set then the assertion holds on the false (bbNext) edge
- // and the OAE_NEXT_EDGE bit needs to be masked to obtain the real assertion index.
- // Currently this is used by OAK_NO_THROW assertions but it may also be useful for other kinds of assertions
- // by removing the need to create unnecessary complementary assertions. However, this bit twiddling mechanism
- // is fragile and should be replaced with something cleaner (e.g. struct + bitfield).
- enum optAssertionEdge : AssertionIndex
- {
- // OAE_JUMP_EDGE = 0x0000, // assertion holds for bbJumpDest (default)
- OAE_NEXT_EDGE = 0x8000, // assertion holds for bbNext
- OAE_INDEX_MASK = 0x7fff
- };
-
protected:
static fgWalkPreFn optAddCopiesCallback;
static fgWalkPreFn optVNAssertionPropCurStmtVisitor;
@@ -5967,8 +5952,6 @@ public:
ValueNumToAssertsMap;
ValueNumToAssertsMap* optValueNumToAsserts;
- static const AssertionIndex NO_ASSERTION_INDEX = 0;
-
// Assertion prop helpers.
ASSERT_TP& GetAssertionDep(unsigned lclNum);
AssertionDsc* optGetAssertion(AssertionIndex assertIndex);
@@ -5989,8 +5972,8 @@ public:
// Assertion Gen functions.
void optAssertionGen(GenTreePtr tree);
AssertionIndex optAssertionGenPhiDefn(GenTreePtr tree);
- AssertionIndex optCreateJTrueBoundsAssertion(GenTreePtr tree);
- AssertionIndex optAssertionGenJtrue(GenTreePtr tree);
+ AssertionInfo optCreateJTrueBoundsAssertion(GenTreePtr tree);
+ AssertionInfo optAssertionGenJtrue(GenTreePtr tree);
AssertionIndex optCreateJtrueAssertions(GenTreePtr op1, GenTreePtr op2, Compiler::optAssertionKind assertionKind);
AssertionIndex optFindComplementary(AssertionIndex assertionIndex);
void optMapComplementary(AssertionIndex assertionIndex, AssertionIndex index);