File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4194,7 +4194,7 @@ class Compiler
41944194 bool lvaVarDoNotEnregister(unsigned varNum);
41954195
41964196 void lvSetMinOptsDoNotEnreg();
4197- void lvSetEHVarsDoNotEnreg ();
4197+ void lvSetVarsDoNotEnreg ();
41984198
41994199 bool lvaEnregEHVars;
42004200 bool lvaEnregMultiRegVars;
Original file line number Diff line number Diff line change @@ -1339,11 +1339,11 @@ void Compiler::lvSetMinOptsDoNotEnreg()
13391339}
13401340
13411341// ------------------------------------------------------------------------
1342- // lvSetEHVarsDoNotEnreg :
1343- // Set locals that we expect to not be enregisterable due to EH as DNER, to
1344- // allow specific optimizations for these by lowering.
1342+ // lvSetVarsDoNotEnreg :
1343+ // Set locals that we expect to not be enregisterable as DNER, to allow
1344+ // specific optimizations for these by lowering.
13451345//
1346- void Compiler::lvSetEHVarsDoNotEnreg ()
1346+ void Compiler::lvSetVarsDoNotEnreg ()
13471347{
13481348 for (unsigned lclNum = 0 ; lclNum < lvaCount; lclNum++)
13491349 {
@@ -1357,6 +1357,10 @@ void Compiler::lvSetEHVarsDoNotEnreg()
13571357 {
13581358 lvaSetVarDoNotEnregister (lclNum DEBUGARG (DoNotEnregisterReason::LiveInOutOfHandler));
13591359 }
1360+ else if (varTypeIsStruct (dsc) && !dsc->lvPromoted && !dsc->IsEnregisterableType ())
1361+ {
1362+ lvaSetVarDoNotEnregister (lclNum DEBUGARG (DoNotEnregisterReason::NotRegSizeStruct));
1363+ }
13601364 }
13611365}
13621366
Original file line number Diff line number Diff line change @@ -8930,9 +8930,9 @@ PhaseStatus Lowering::DoPhase()
89308930 }
89318931 else
89328932 {
8933- // By this point tracked locals live into EH clauses are _very_ likely to not be enregistered.
8934- // DNER this for the same reason above, so that we can contain these locals .
8935- m_compiler->lvSetEHVarsDoNotEnreg ();
8933+ // For many locals we know at this point that we won't enregister them,
8934+ // so DNER these for the same reasons as above .
8935+ m_compiler->lvSetVarsDoNotEnreg ();
89368936 }
89378937
89388938 if (m_compiler->opts .OptimizationEnabled () && !m_compiler->opts .IsOSR ())
You can’t perform that action at this time.
0 commit comments