summaryrefslogtreecommitdiff
path: root/src/jit/inlinepolicy.cpp
diff options
context:
space:
mode:
authorJoseph Tremoulet <jotrem@microsoft.com>2016-07-29 13:54:37 -0400
committerJoseph Tremoulet <jotrem@microsoft.com>2016-08-04 20:29:03 -0400
commit6fe08a80542d496e657eaed4902bd33ebce4c6f8 (patch)
tree9058f99c7502b156ada3724083b1e7733faf0ee5 /src/jit/inlinepolicy.cpp
parent3931929b53f1fb01d9d137a04906c3047e61d4ba (diff)
downloadcoreclr-6fe08a80542d496e657eaed4902bd33ebce4c6f8.tar.gz
coreclr-6fe08a80542d496e657eaed4902bd33ebce4c6f8.tar.bz2
coreclr-6fe08a80542d496e657eaed4902bd33ebce4c6f8.zip
Allow inlining when inlinee has `starg`
The inliner's restriction that methods that make use of the `starg` opcode cannot be inlined is somewhat artificial. The comments indicate that the reason for this excluion is because the inliner forward-substitutes argument expressions in place of parameter references, but the codepaths required to force evaluating an argument expression at the callsite and reference that result in place of parameter references is already in place to handle `ldarga` and complex argument expressions. This change - adds an `argHasStargOp` flag to the `inlArgInfo` type, similar to the existing `argHasLdargaOp` flag - removes the `CALLEE_STORES_TO_ARGUMENT` inline observation and instead sets the new flag for `starg` cases - updates `impInlineFetchArg` to force evaluation to a temp for arguments that are marked `argHasStargOp` - updates `starg` processing in the importer to store to the corresponding temp when importing for an inlinee Resolves #6014.
Diffstat (limited to 'src/jit/inlinepolicy.cpp')
-rw-r--r--src/jit/inlinepolicy.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/jit/inlinepolicy.cpp b/src/jit/inlinepolicy.cpp
index 8a8166b13e..28a9d21a55 100644
--- a/src/jit/inlinepolicy.cpp
+++ b/src/jit/inlinepolicy.cpp
@@ -298,7 +298,6 @@ void LegacyPolicy::NoteBool(InlineObservation obs, bool value)
case InlineObservation::CALLEE_HAS_SWITCH:
case InlineObservation::CALLEE_UNSUPPORTED_OPCODE:
- case InlineObservation::CALLEE_STORES_TO_ARGUMENT:
// LegacyPolicy ignores these for prejit roots.
if (!m_IsPrejitRoot)
{
@@ -927,7 +926,6 @@ void RandomPolicy::NoteBool(InlineObservation obs, bool value)
case InlineObservation::CALLEE_HAS_SWITCH:
case InlineObservation::CALLEE_UNSUPPORTED_OPCODE:
- case InlineObservation::CALLEE_STORES_TO_ARGUMENT:
// Pass these on, they should cause inlining to fail.
propagate = true;
break;