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

JIT: Merge stores#92852

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 18 commits intodotnet:mainfromEgorBo:merge-stores
Oct 3, 2023
Merged
Changes from1 commit
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
50d2929
STOREIND Coalescing
EgorBoSep 30, 2023
eedb979
Remove short temporarily
EgorBoSep 30, 2023
bfe1765
Check that both indirs are unused
EgorBoSep 30, 2023
6f2838e
Enable short
EgorBoSep 30, 2023
532266b
Enable BYTE
EgorBoSep 30, 2023
033a168
Update lower.cpp
EgorBoOct 1, 2023
9b17c32
call multiple times
Oct 1, 2023
48a8f85
Clean up, disable for some platforms due to unaligned reads
EgorBoOct 1, 2023
ed568a6
Clean up
EgorBoOct 1, 2023
4fbbeef
Clean up
EgorBoOct 1, 2023
c50200b
Simplify
EgorBoOct 1, 2023
b9c3f6c
Apply suggestions from code review
EgorBoOct 2, 2023
7975250
Merge branch 'main' of github.com:dotnet/runtime into merge-stores
EgorBoOct 2, 2023
3cc4585
Address feedback
EgorBoOct 2, 2023
f0dd22a
Address feedback
EgorBoOct 2, 2023
5c954fa
Clean up
EgorBoOct 2, 2023
62f9bed
Address feedback
EgorBoOct 2, 2023
b2e4b1a
Update src/coreclr/jit/lower.cpp
EgorBoOct 3, 2023
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
PrevPrevious commit
NextNext commit
Enable BYTE
  • Loading branch information
@EgorBo
EgorBo committedSep 30, 2023
commit532266bc08c6eea58d537b4e90ce751a368fc807
15 changes: 10 additions & 5 deletionssrc/coreclr/jit/lower.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7991,7 +7991,7 @@ void Lowering::LowerCoalescingWithPreviousInd(GenTreeStoreInd* ind)

// This check is not really needed, just for better throughput.
// We only support these types for the initial version.
if (!ind->TypeIs(TYP_SHORT, TYP_USHORT, TYP_INT))
if (!ind->TypeIs(TYP_BYTE, TYP_UBYTE,TYP_SHORT, TYP_USHORT, TYP_INT))
{
return;
}
Expand DownExpand Up@@ -8035,6 +8035,11 @@ void Lowering::LowerCoalescingWithPreviousInd(GenTreeStoreInd* ind)
var_types newType;
switch (oldType)
{
case TYP_BYTE:
case TYP_UBYTE:
newType = TYP_USHORT;
break;

case TYP_SHORT:
case TYP_USHORT:
newType = TYP_INT;
Expand All@@ -8046,7 +8051,7 @@ void Lowering::LowerCoalescingWithPreviousInd(GenTreeStoreInd* ind)
break;
#endif

// TODO:BYTE,SIMD
// TODO: SIMD

default:
return;
Expand DownExpand Up@@ -8087,16 +8092,16 @@ void Lowering::LowerCoalescingWithPreviousInd(GenTreeStoreInd* ind)

// Trim the constants to the size of the type, e.g. for TYP_SHORT and TYP_USHORT
// the mask will be 0xFFFF, for TYP_INT - 0xFFFFFFFF.
size_t mask = ~0 >> (sizeof(size_t) - genTypeSize(oldType)) * BITS_IN_BYTE;
size_t mask = ~0UL >> (sizeof(size_t) - genTypeSize(oldType)) * BITS_IN_BYTE;
lowerCns &= mask;
upperCns &= mask;

ssize_t val =(ssize_t)(lowerCns | (upperCns << (genTypeSize(oldType) * BITS_IN_BYTE)));
size_t val = (lowerCns | (upperCns << (genTypeSize(oldType) * BITS_IN_BYTE)));
JITDUMP("Coalesced two stores into a single store with value %lld\n", (int64_t)val);

// It's not expected to be contained yet, but just in case...
ind->Data()->ClearContained();
ind->Data()->AsIntCon()->gtIconVal = val;
ind->Data()->AsIntCon()->gtIconVal =(ssize_t)val;
}

// Now check whether we can coalesce the new store with the previous one, e.g. we had:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp