Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Clarify comment
  • Loading branch information
CarolEidt committed Oct 6, 2020
commit 134dd48d6a9a8186cdadcb89b2d4a82edaa5bf82
4 changes: 3 additions & 1 deletion src/coreclr/src/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17591,7 +17591,9 @@ void Compiler::fgPromoteStructs()
lvaStructPromotionInfo structPromotionInfo;
bool tooManyLocalsReported = false;

// Clear the structPromotionHelper, since it is conservative about looking up SIMD info.
// Clear the structPromotionHelper, since it is used during inlining, at which point it
// may be conservative about looking up SIMD info.
// We don't want to preserve those conservative decisions for the actual struct promotion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation and the comment, I would probably rephrase it as: since it is used during importation for inlining decisions.

the place that uses it before we call struct promotion is:

// Note if the callee's class is a promotable struct
if ((info.compClassAttr & CORINFO_FLG_VALUECLASS) != 0)
{
assert(structPromotionHelper != nullptr);
if (structPromotionHelper->CanPromoteStructType(info.compClassHnd))
{
inlineResult->Note(InlineObservation::CALLEE_CLASS_PROMOTABLE);
}

structPromotionHelper->Clear();

for (unsigned lclNum = 0; lclNum < startLvaCount; lclNum++)
Expand Down