Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle more than 64 registers - Part 4 #102921

Merged
merged 51 commits into from
Jun 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e895528
Add high field
kunalspathak May 24, 2024
78b34fa
Do not use `const regMaskTP&` as parameter
kunalspathak May 24, 2024
b3218e1
Revert "Do not use `const regMaskTP&` as parameter"
kunalspathak May 24, 2024
ccddf1c
Furture reduce the TP cost
kunalspathak May 24, 2024
53c29d1
jit fornat
kunalspathak May 24, 2024
b4b08fa
Add high to all platforms
kunalspathak May 24, 2024
fed5c2a
use genSingleTypeRegMask()
kunalspathak May 29, 2024
6ffccb3
Make high only to arm64
kunalspathak May 29, 2024
27b8170
Use HAS_MORE_THAN_64_REGISTERS macro
kunalspathak May 29, 2024
4fe1caa
Add regTypeTag in register*.h files
kunalspathak May 29, 2024
a38460a
change the structure of regMaskTP for performance
kunalspathak May 29, 2024
c192d95
AddRegNumInMask/AddRegNum
kunalspathak May 29, 2024
ed203f3
Use AddRegNumInMask() and AddRegNum()
kunalspathak May 29, 2024
fd18c7f
RemoveRegNumFromMask() and RemoveRegNum() and consume them
kunalspathak May 29, 2024
f370cf1
Use IsEmpty() and IsNonEmpty()
kunalspathak May 29, 2024
1d0f492
IsRegNumInMask() and IsRegNumPresent()
kunalspathak May 29, 2024
535c2e1
AddGprRegs()
kunalspathak May 29, 2024
147a88b
AddRegsetForType()
kunalspathak May 29, 2024
d14f56a
RemoveRegsetForType()
kunalspathak May 29, 2024
2d1d2bb
GetRegSetForType() defintion
kunalspathak May 29, 2024
7542417
operators() that operate on regNum
kunalspathak May 29, 2024
5f63e60
misc cleanup
kunalspathak May 29, 2024
e56dc9b
fix some other build failures
kunalspathak May 29, 2024
b2d9b1c
jit format
kunalspathak May 29, 2024
687ed43
Add operator[]
kunalspathak May 30, 2024
3741ac6
Move mapTypeToRegTypeIndex() and mapRegNumtoRegTypeIndex() in compile…
kunalspathak May 30, 2024
8b7084a
Move registerType in Referencable, add getRegisterType()
kunalspathak May 30, 2024
cedb079
Add various variants of genRegNumFromMask() and use them
kunalspathak May 30, 2024
edccae2
Change some more methods to return SingleTypeRegMask
kunalspathak May 31, 2024
c72147f
Initialize regMaskTP in genRegMask()
kunalspathak May 31, 2024
fb0c4ca
bug fix
kunalspathak May 31, 2024
7de39e7
Add assert in genFindLowestBit() and genMaxOneBit() to be only applic…
kunalspathak May 31, 2024
95ca449
genRegNumFromMask() to take SingleTypeRegSet
kunalspathak May 31, 2024
6f07fc3
jit format
kunalspathak May 31, 2024
523e684
Merge remote-tracking branch 'origin/main' into part4
kunalspathak May 31, 2024
00c5c33
Merge remote-tracking branch 'origin/main' into part4
kunalspathak May 31, 2024
42ea15b
fix another assert
kunalspathak May 31, 2024
20bfbb3
Rename getRegMask to getSingleTypeRegMask
kunalspathak Jun 1, 2024
8539238
Move HAS_MORE_THAN_64_REGISTERS related macros
kunalspathak Jun 1, 2024
3bcd7ef
skip unnecessary initialization
kunalspathak Jun 1, 2024
5c1cd6f
fix some places where implicit conversion from `SingleTypeRegSet -> r…
kunalspathak Jun 1, 2024
bc4af58
fix a bug for populating availableRegs
kunalspathak Jun 2, 2024
156c2d6
Simplify the updating of high field
kunalspathak Jun 2, 2024
ac4768b
Revert "Add regTypeTag in register*.h files"
kunalspathak Jun 2, 2024
31e508d
misc cleanup
kunalspathak Jun 2, 2024
67983ec
jit format
kunalspathak Jun 2, 2024
0b67c48
fix the linux build error
kunalspathak Jun 2, 2024
7d3659f
Revert "fix the linux build error"
kunalspathak Jun 2, 2024
92aa687
fix linux error properly
kunalspathak Jun 2, 2024
b44dbe8
fix linux/arm bug
kunalspathak Jun 3, 2024
116b945
review feedback
kunalspathak Jun 4, 2024
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
Next Next commit
jit fornat
kunalspathak committed May 29, 2024

Verified

This commit was signed with the committer’s verified signature.
Eikix Elias Tazartes
commit 53c29d13f172c59a2a5951a63bb1238478101cd7
2 changes: 0 additions & 2 deletions src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
@@ -1016,8 +1016,6 @@ inline regNumber genFirstRegNumFromMaskAndToggle(SingleTypeRegSet& mask)
return regNum;
}



/*****************************************************************************
*
* Return the size in bytes of the given type.
7 changes: 4 additions & 3 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
@@ -4174,9 +4174,10 @@ regNumber LinearScan::rotateBlockStartLocation(Interval* interval, regNumber tar
{
// If we're rotating the register locations at block boundaries, try to use
// the next higher register number of the appropriate register type.
SingleTypeRegSet candidateRegs = allRegs(interval->registerType) & availableRegs.GetRegSetForType(interval->registerType);
regNumber firstReg = REG_NA;
regNumber newReg = REG_NA;
SingleTypeRegSet candidateRegs =
allRegs(interval->registerType) & availableRegs.GetRegSetForType(interval->registerType);
regNumber firstReg = REG_NA;
regNumber newReg = REG_NA;
while (candidateRegs != RBM_NONE)
{
regNumber nextReg = genFirstRegNumFromMaskAndToggle(candidateRegs);
7 changes: 3 additions & 4 deletions src/coreclr/jit/target.h
Original file line number Diff line number Diff line change
@@ -231,12 +231,12 @@ typedef uint64_t regMaskSmall;

#ifdef TARGET_ARM64
#define HAS_MORE_THAN_64_REGISTERS 1
#define MORE_THAN_64_REGISTERS(x) x
#define MORE_THAN_64_REGISTERS(x) x
#else
#define MORE_THAN_64_REGISTERS(x)
#endif // TARGET_ARM64

typedef regMaskSmall SingleTypeRegSet;
typedef regMaskSmall SingleTypeRegSet;
inline SingleTypeRegSet genRegMask(regNumber reg);
inline SingleTypeRegSet genRegMaskFloat(regNumber reg ARM_ARG(var_types type = TYP_DOUBLE));

@@ -249,7 +249,7 @@ struct regMaskTP
public:
regMaskTP(regMaskSmall regMask)
: low(regMask)
{
{
}

regMaskTP()
@@ -323,7 +323,6 @@ struct regMaskTP

bool IsRegNumInMask(regNumber reg);


void operator|=(const regMaskTP& second)
{
low |= second.getLow();