Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix perf issues discovered in "For software performance, can you always trust inlining" blog#61408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
EgorBo merged 9 commits intodotnet:mainfromEgorBo:fix-lemire-issues
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from1 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
NextNext commit
Make Vector128.Create more expensive, enable call opcode resolution i…
…n no-TC mode
  • Loading branch information
@EgorBo
EgorBo committedNov 10, 2021
commita4331028d2656e1d9d53280c2814e6fedc430c6b
2 changes: 1 addition & 1 deletionsrc/coreclr/jit/fgbasic.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -893,7 +893,7 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed
unsigned retBlocks = 0;
int prefixFlags = 0;
bool preciseScan = makeInlineObservations && compInlineResult->GetPolicy()->RequiresPreciseScan();
const bool resolveTokens = preciseScan && (isPreJit || isTier1);
const bool resolveTokens = preciseScan;

// Track offsets where IL instructions begin in DEBUG builds. Used to
// validate debug info generated by the JIT.
Expand Down
31 changes: 28 additions & 3 deletionssrc/coreclr/jit/gentree.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3948,10 +3948,12 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
costSz = 2 * 2;
break;

#if defined(FEATURE_HW_INTRINSICS) && defined(TARGET_XARCH)
#if defined(FEATURE_HW_INTRINSICS)
case GT_HWINTRINSIC:
{
if (tree->AsHWIntrinsic()->OperIsMemoryLoadOrStore())
GenTreeHWIntrinsic* hwTree = tree->AsHWIntrinsic();
#if defined(TARGET_XARCH)
if (hwTree->OperIsMemoryLoadOrStore())
{
costEx = IND_COST_EX;
costSz = 2;
Expand All@@ -3964,9 +3966,32 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
goto DONE;
}
}
#endif

switch (hwTree->gtHWIntrinsicId)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to review costing for HW intrinsics more broadly?

Copy link
Member

Choose a reason for hiding this comment

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

We likely should. We probably aren't accounting for cases where helper intrinsics are more expensive than they appear nor cases where operands have less cost due to special handling that hardware intrinsics get.

There's also probably cases where operands (like scalar DBL_CNS) are currently participating in overall CSE and shouldn't for certain cases.

{
#if defined(TARGET_XARCH)
case NI_Vector128_Create:
case NI_Vector256_Create:
#elif defined(TARGET_ARM64)
case NI_Vector64_Create:
case NI_Vector128_Create:
#endif
{
if (hwTree->gtGetOp1()->OperIsConst() && (hwTree->gtGetOp2() == nullptr))
{
// Vector.Create(cns) is cheap but not that cheap to be (1,1)
costEx = 2;
costSz = 2;
}
break;
}
default:
break;
}
}
break;
#endif // FEATURE_HW_INTRINSICS && TARGET_XARCH
#endif // FEATURE_HW_INTRINSICS

case GT_BLK:
case GT_IND:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp