Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 01cb1ae

Browse files
committed
Merge pull request #3083 from AndyAyersMS/InlineRefactor2a
Inliner refactoring: inline impAbortInline
2 parents ceb0a80 + 433a137 commit 01cb1ae

File tree

2 files changed

+3
-29
lines changed

2 files changed

+3
-29
lines changed

src/jit/compiler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3354,7 +3354,6 @@ protected :
33543354
void impLoadArg(unsigned ilArgNum, IL_OFFSET offset);
33553355
void impLoadLoc(unsigned ilLclNum, IL_OFFSET offset);
33563356
bool impReturnInstruction(BasicBlock *block, int prefixFlags, OPCODE &opcode);
3357-
void impAbortInline(bool abortThisInlineOnly, bool contextDependent, const char *reason);
33583357

33593358
#if defined(_TARGET_ARM_)
33603359
void impMarkLclDstNotPromotable(unsigned tmpNum, GenTreePtr op, CORINFO_CLASS_HANDLE hClass);

src/jit/importer.cpp

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13405,31 +13405,6 @@ MATH_MAYBE_CALL_NO_OVF: ovfl = false;
1340513405
#pragma warning(pop)
1340613406
#endif
1340713407

13408-
void Compiler::impAbortInline(bool abortThisInlineOnly, bool contextDependent,
13409-
const char *reason)
13410-
{
13411-
JITDUMP("\n\nInline expansion aborted due to opcode [%02u] OP_%s in method %s\n",
13412-
impCurOpcOffs, impCurOpcName, info.compFullName);
13413-
13414-
if (abortThisInlineOnly)
13415-
{
13416-
JITDUMP("(aborted for this callsite only)\n");
13417-
compInlineResult->setFailure(reason);
13418-
}
13419-
else
13420-
{
13421-
compInlineResult->setNever(reason);
13422-
}
13423-
13424-
if (contextDependent)
13425-
{
13426-
JITDUMP("Context dependent inline rejection for method %s\n", info.compFullName);
13427-
}
13428-
13429-
assert(compIsForInlining());
13430-
assert(impInlineInfo->fncHandle == info.compMethodHnd);
13431-
}
13432-
1343313408
// Push a local/argument treeon the operand stack
1343413409
void Compiler::impPushVar(GenTree * op, typeInfo tiRetVal)
1343513410
{
@@ -13471,7 +13446,7 @@ void Compiler::impLoadArg(unsigned ilArgNum, IL_OFFSET offset)
1347113446
{
1347213447
if (ilArgNum >= info.compArgsCount)
1347313448
{
13474-
impAbortInline(false, false, "bad arg num");
13449+
compInlineResult->setNever("bad argument number");
1347513450
return;
1347613451
}
1347713452

@@ -13513,7 +13488,7 @@ void Compiler::impLoadLoc(unsigned ilLclNum, IL_OFFSET offset)
1351313488
{
1351413489
if (ilLclNum >= info.compMethodInfo->locals.numArgs)
1351513490
{
13516-
impAbortInline(false, false, "bad loc num");
13491+
compInlineResult->setNever("bad local number");
1351713492
return;
1351813493
}
1351913494

@@ -13699,7 +13674,7 @@ bool Compiler::impReturnInstruction(BasicBlock *block, int prefixFlags, OPCODE &
1369913674

1370013675
if (returnType != originalCallType)
1370113676
{
13702-
impAbortInline(true, false, "Return types are not matching.");
13677+
compInlineResult->setFailure("Return type mismatch");
1370313678
return false;
1370413679
}
1370513680

0 commit comments

Comments
 (0)