diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index 43a6f977d11f2..96a63f2f53465 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -1299,7 +1299,14 @@ PhaseStatus LinearScan::doLinearScan() nextConsecutiveRefPositionMap = nullptr; #endif - buildIntervals(); + if (enregisterLocalVars) + { + buildIntervals(); + } + else + { + buildIntervals(); + } DBEXEC(VERBOSE, TupleStyleDump(LSRA_DUMP_REFPOS)); compiler->EndPhase(PHASE_LINEAR_SCAN_BUILD); @@ -1650,17 +1657,8 @@ bool LinearScan::isRegCandidate(LclVarDsc* varDsc) return true; } -void LinearScan::identifyCandidates() -{ - if (enregisterLocalVars) - { - identifyCandidates(); - } - else - { - identifyCandidates(); - } -} +template void LinearScan::identifyCandidates(); +template void LinearScan::identifyCandidates(); // Identify locals & compiler temps that are register candidates // TODO-Cleanup: This was cloned from Compiler::lvaSortByRefCount() in lclvars.cpp in order diff --git a/src/coreclr/jit/lsra.h b/src/coreclr/jit/lsra.h index 47a1160c8eb1b..b5cdad9f7e4d0 100644 --- a/src/coreclr/jit/lsra.h +++ b/src/coreclr/jit/lsra.h @@ -644,7 +644,6 @@ class LinearScan : public LinearScanInterface // This does the dataflow analysis and builds the intervals template void buildIntervals(); - void buildIntervals(); // This is where the actual assignment is done #ifdef TARGET_ARM64 @@ -990,7 +989,6 @@ class LinearScan : public LinearScanInterface // Determine which locals are candidates for allocation template void identifyCandidates(); - void identifyCandidates(); // determine which locals are used in EH constructs we don't want to deal with void identifyCandidatesExceptionDataflow(); diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index 8e2c80a3273b2..56f449c47f868 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -2126,21 +2126,8 @@ void LinearScan::updateRegStateForArg(LclVarDsc* argDsc) } } -//------------------------------------------------------------------------ -// buildIntervals: The main entry point for building the data structures over -// which we will do register allocation. -// -void LinearScan::buildIntervals() -{ - if (enregisterLocalVars) - { - buildIntervals(); - } - else - { - buildIntervals(); - } -} +template void LinearScan::buildIntervals(); +template void LinearScan::buildIntervals(); //------------------------------------------------------------------------ // buildIntervals: The main entry point for building the data structures over @@ -2185,7 +2172,7 @@ void LinearScan::buildIntervals() doDoubleAlign = false; #endif - identifyCandidates(); + identifyCandidates(); // Figure out if we're going to use a frame pointer. We need to do this before building // the ref positions, because those objects will embed the frame register in various register masks