summaryrefslogtreecommitdiff
path: root/src/jit/inline.def
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2016-03-07 12:23:09 -0800
committerAndy Ayers <andya@microsoft.com>2016-03-07 13:29:27 -0800
commit96783862204ea1dd91e55ef4c44179535ff68514 (patch)
treef5d8f593ead8af856a6129838a01af17c29e43da /src/jit/inline.def
parentb440fdf5e0ed03e511a9adcb9196ce324ab2e09a (diff)
downloadcoreclr-96783862204ea1dd91e55ef4c44179535ff68514.tar.gz
coreclr-96783862204ea1dd91e55ef4c44179535ff68514.tar.bz2
coreclr-96783862204ea1dd91e55ef4c44179535ff68514.zip
Inline refactoring: revise candidacy determination
Rework the code to determine the key aspects of candidacy up front rather than figuring it out eventually. In particular this ensures that the two stages of evaulation for inlines both start at the same point for candidates. This will help streamline subsequent work to move the state machine into the policy, since the state machine is only needed for the case where the candidate is a discretionary inline, and the policy now tracks this directly. For the `LegacyPolicy`, if an inline is both smaller than the always inline size and marked force inline, attribute its inlining to its small size. Remove bulk of the of the "evaluation in progress" candidate observations since they don't add much value. As a result `noteCandidate` is not needed as an external API, and can be repurposed internally as `setCandidate`. Change how the prejit root case is tracked to make it explicit from the context rather than a callback to the compiler.
Diffstat (limited to 'src/jit/inline.def')
-rw-r--r--src/jit/inline.def9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/jit/inline.def b/src/jit/inline.def
index 2678ee3051..19a5147ce4 100644
--- a/src/jit/inline.def
+++ b/src/jit/inline.def
@@ -74,20 +74,19 @@ INLINE_OBSERVATION(TOO_MUCH_IL, bool, "too many il bytes",
INLINE_OBSERVATION(ARG_FEEDS_CONSTANT_TEST, bool, "argument feeds constant test", INFORMATION, CALLEE)
INLINE_OBSERVATION(ARG_FEEDS_RANGE_CHECK, bool, "argument feeds range check", INFORMATION, CALLEE)
INLINE_OBSERVATION(BELOW_ALWAYS_INLINE_SIZE, bool, "below ALWAYS_INLINE size", INFORMATION, CALLEE)
-INLINE_OBSERVATION(CAN_INLINE_IL, bool, "IL passes basic checks", INFORMATION, CALLEE)
-INLINE_OBSERVATION(CHECK_CAN_INLINE_IL, bool, "IL passes detailed checks", INFORMATION, CALLEE)
INLINE_OBSERVATION(CLASS_PROMOTABLE, bool, "promotable value class", INFORMATION, CALLEE)
INLINE_OBSERVATION(HAS_SIMD, bool, "has SIMD arg, local, or ret", INFORMATION, CALLEE)
INLINE_OBSERVATION(HAS_SWITCH, bool, "has switch", INFORMATION, CALLEE)
+INLINE_OBSERVATION(IL_CODE_SIZE, int, "number of bytes of IL", INFORMATION, CALLEE)
+INLINE_OBSERVATION(IS_DISCRETIONARY_INLINE, bool, "can inline, check heuristics", INFORMATION, CALLEE)
INLINE_OBSERVATION(IS_FORCE_INLINE, bool, "aggressive inline attribute", INFORMATION, CALLEE)
INLINE_OBSERVATION(IS_INSTANCE_CTOR, bool, "instance constructor", INFORMATION, CALLEE)
+INLINE_OBSERVATION(IS_MOSTLY_LOAD_STORE, bool, "method is mostly load/store", INFORMATION, CALLEE)
INLINE_OBSERVATION(LOOKS_LIKE_WRAPPER, bool, "thin wrapper around a call", INFORMATION, CALLEE)
INLINE_OBSERVATION(MAXSTACK, int, "maxstack", INFORMATION, CALLEE)
-INLINE_OBSERVATION(IS_MOSTLY_LOAD_STORE, bool, "method is mostly load/store", INFORMATION, CALLEE)
INLINE_OBSERVATION(NATIVE_SIZE_ESTIMATE, double, "native size estimate", INFORMATION, CALLEE)
INLINE_OBSERVATION(NUMBER_OF_ARGUMENTS, int, "number of arguments", INFORMATION, CALLEE)
INLINE_OBSERVATION(NUMBER_OF_BASIC_BLOCKS, int, "number of basic blocks", INFORMATION, CALLEE)
-INLINE_OBSERVATION(NUMBER_OF_IL_BYTES, int, "number of bytes of IL", INFORMATION, CALLEE)
INLINE_OBSERVATION(NUMBER_OF_LOCALS, int, "number of locals", INFORMATION, CALLEE)
// ------ Caller Corectness -------
@@ -141,11 +140,9 @@ INLINE_OBSERVATION(TOO_MANY_LOCALS, bool, "too many locals",
// ------ Call Site Information -------
-INLINE_OBSERVATION(ARGS_OK, bool, "arguments suitable", INFORMATION, CALLSITE)
INLINE_OBSERVATION(BENEFIT_MULTIPLIER, double, "benefit multiplier", INFORMATION, CALLSITE)
INLINE_OBSERVATION(CONSTANT_ARG_FEEDS_TEST, bool, "constant argument feeds test", INFORMATION, CALLSITE)
INLINE_OBSERVATION(DEPTH, int, "depth", INFORMATION, CALLSITE)
-INLINE_OBSERVATION(LOCALS_OK, bool, "locals suitable", INFORMATION, CALLSITE)
INLINE_OBSERVATION(NATIVE_SIZE_ESTIMATE, double, "native size estimate", INFORMATION, CALLSITE)
INLINE_OBSERVATION(NATIVE_SIZE_ESTIMATE_OK, bool, "native size estimate ok", INFORMATION, CALLSITE)