From 096ab2a4fa7646981879665c22975ff680847a4d Mon Sep 17 00:00:00 2001 From: Steven He Date: Wed, 22 Jan 2025 18:51:01 +0900 Subject: [PATCH] Remove unused ilOffset --- src/coreclr/jit/compiler.h | 4 +--- src/coreclr/jit/fginline.cpp | 7 +------ src/coreclr/jit/importercalls.cpp | 16 +++++----------- src/coreclr/jit/inline.h | 2 -- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 3257670a24bce6..f971d0c62417b1 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -5223,15 +5223,13 @@ class Compiler void impMarkInlineCandidate(GenTree* call, CORINFO_CONTEXT_HANDLE exactContextHnd, bool exactContextNeedsRuntimeLookup, - CORINFO_CALL_INFO* callInfo, - IL_OFFSET ilOffset); + CORINFO_CALL_INFO* callInfo); void impMarkInlineCandidateHelper(GenTreeCall* call, uint8_t candidateIndex, CORINFO_CONTEXT_HANDLE exactContextHnd, bool exactContextNeedsRuntimeLookup, CORINFO_CALL_INFO* callInfo, - IL_OFFSET ilOffset, InlineResult* inlineResult); bool impTailCallRetTypeCompatible(bool allowWidening, diff --git a/src/coreclr/jit/fginline.cpp b/src/coreclr/jit/fginline.cpp index b617075f190239..1b4dbab26d3552 100644 --- a/src/coreclr/jit/fginline.cpp +++ b/src/coreclr/jit/fginline.cpp @@ -609,15 +609,10 @@ class SubstitutePlaceholdersAndDevirtualizeWalker : public GenTreeVisitorgtRawILOffset; -#else - IL_OFFSET ilOffset = m_curStmt->GetDebugInfo().GetLocation().GetOffset(); -#endif // defined(DEBUG) CORINFO_CALL_INFO callInfo = {}; callInfo.hMethod = method; callInfo.methodFlags = methodFlags; - m_compiler->impMarkInlineCandidate(call, context, false, &callInfo, ilOffset); + m_compiler->impMarkInlineCandidate(call, context, false, &callInfo); if (call->IsInlineCandidate()) { diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index 7ef15072a61853..a93dd1dfea99aa 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -1030,7 +1030,7 @@ var_types Compiler::impImportCall(OPCODE opcode, INDEBUG(call->AsCall()->gtRawILOffset = rawILOffset); // Is it an inline candidate? - impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, rawILOffset); + impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo); } // append the call node. @@ -1240,7 +1240,7 @@ var_types Compiler::impImportCall(OPCODE opcode, INDEBUG(call->AsCall()->gtRawILOffset = rawILOffset); // Is it an inline candidate? - impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, rawILOffset); + impMarkInlineCandidate(call, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo); } // Extra checks for tail calls and tail recursion. @@ -7450,7 +7450,6 @@ void Compiler::addGuardedDevirtualizationCandidate(GenTreeCall* call, // exactContextHnd -- context handle for inlining // exactContextNeedsRuntimeLookup -- true if context required runtime lookup // callInfo -- call info from VM -// ilOffset -- the actual IL offset of the instruction that produced this inline candidate // // Notes: // Mostly a wrapper for impMarkInlineCandidateHelper that also undoes @@ -7460,8 +7459,7 @@ void Compiler::addGuardedDevirtualizationCandidate(GenTreeCall* call, void Compiler::impMarkInlineCandidate(GenTree* callNode, CORINFO_CONTEXT_HANDLE exactContextHnd, bool exactContextNeedsRuntimeLookup, - CORINFO_CALL_INFO* callInfo, - IL_OFFSET ilOffset) + CORINFO_CALL_INFO* callInfo) { if (!opts.OptEnabled(CLFLG_INLINING)) { @@ -7484,7 +7482,7 @@ void Compiler::impMarkInlineCandidate(GenTree* callNode, // Do the actual evaluation impMarkInlineCandidateHelper(call, candidateId, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, - ilOffset, &inlineResult); + &inlineResult); // Ignore non-inlineable candidates // TODO: Consider keeping them to just devirtualize without inlining, at least for interface // calls on NativeAOT, but that requires more changes elsewhere too. @@ -7507,8 +7505,7 @@ void Compiler::impMarkInlineCandidate(GenTree* callNode, const uint8_t candidatesCount = call->GetInlineCandidatesCount(); assert(candidatesCount <= 1); InlineResult inlineResult(this, call, nullptr, "impMarkInlineCandidate"); - impMarkInlineCandidateHelper(call, 0, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, ilOffset, - &inlineResult); + impMarkInlineCandidateHelper(call, 0, exactContextHnd, exactContextNeedsRuntimeLookup, callInfo, &inlineResult); } // If this call is an inline candidate or is not a guarded devirtualization @@ -7541,7 +7538,6 @@ void Compiler::impMarkInlineCandidate(GenTree* callNode, // exactContextHnd -- context handle for inlining // exactContextNeedsRuntimeLookup -- true if context required runtime lookup // callInfo -- call info from VM -// ilOffset -- IL offset of instruction creating the inline candidate // // Notes: // If callNode is an inline candidate, this method sets the flag @@ -7558,7 +7554,6 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call, CORINFO_CONTEXT_HANDLE exactContextHnd, bool exactContextNeedsRuntimeLookup, CORINFO_CALL_INFO* callInfo, - IL_OFFSET ilOffset, InlineResult* inlineResult) { // Let the strategy know there's another call @@ -7780,7 +7775,6 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call, // The new value should not be null. assert(inlineCandidateInfo != nullptr); inlineCandidateInfo->exactContextNeedsRuntimeLookup = exactContextNeedsRuntimeLookup; - inlineCandidateInfo->ilOffset = ilOffset; // If we're in an inlinee compiler, and have a return spill temp, and this inline candidate // is also a tail call candidate, it can use the same return spill temp. diff --git a/src/coreclr/jit/inline.h b/src/coreclr/jit/inline.h index ce50b2cc93dba8..3b55842aafe7d3 100644 --- a/src/coreclr/jit/inline.h +++ b/src/coreclr/jit/inline.h @@ -622,8 +622,6 @@ struct InlineCandidateInfo : public HandleHistogramProfileCandidateInfo unsigned clsAttr; unsigned methAttr; - // actual IL offset of instruction that resulted in this inline candidate - IL_OFFSET ilOffset; CorInfoInitClassResult initClassResult; var_types fncRetType; bool exactContextNeedsRuntimeLookup;