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

LSRA: Make genRegMask() return regMaskTP #102783

Merged
merged 12 commits into from
May 29, 2024
16 changes: 8 additions & 8 deletions src/coreclr/jit/codegeninterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,31 @@ class CodeGenInterface
}

#if defined(TARGET_AMD64)
SingleTypeRegSet rbmAllFloat;
SingleTypeRegSet rbmFltCalleeTrash;
regMaskTP rbmAllFloat;
regMaskTP rbmFltCalleeTrash;

FORCEINLINE SingleTypeRegSet get_RBM_ALLFLOAT() const
FORCEINLINE regMaskTP get_RBM_ALLFLOAT() const
{
return this->rbmAllFloat;
}
FORCEINLINE SingleTypeRegSet get_RBM_FLT_CALLEE_TRASH() const
FORCEINLINE regMaskTP get_RBM_FLT_CALLEE_TRASH() const
{
return this->rbmFltCalleeTrash;
}
#endif // TARGET_AMD64

#if defined(TARGET_XARCH)
SingleTypeRegSet rbmAllMask;
SingleTypeRegSet rbmMskCalleeTrash;
regMaskTP rbmAllMask;
regMaskTP rbmMskCalleeTrash;

// Call this function after the equivalent fields in Compiler have been initialized.
void CopyRegisterInfo();

FORCEINLINE SingleTypeRegSet get_RBM_ALLMASK() const
FORCEINLINE regMaskTP get_RBM_ALLMASK() const
{
return this->rbmAllMask;
}
FORCEINLINE SingleTypeRegSet get_RBM_MSK_CALLEE_TRASH() const
FORCEINLINE regMaskTP get_RBM_MSK_CALLEE_TRASH() const
{
return this->rbmMskCalleeTrash;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3485,12 +3485,12 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
// Make sure we copy the register info and initialize the
// trash regs after the underlying fields are initialized

const SingleTypeRegSet vtCalleeTrashRegs[TYP_COUNT]{
const regMaskTP vtCalleeTrashRegs[TYP_COUNT]{
#define DEF_TP(tn, nm, jitType, sz, sze, asze, st, al, regTyp, regFld, csr, ctr, tf) ctr,
#include "typelist.h"
#undef DEF_TP
};
memcpy(varTypeCalleeTrashRegs, vtCalleeTrashRegs, sizeof(SingleTypeRegSet) * TYP_COUNT);
memcpy(varTypeCalleeTrashRegs, vtCalleeTrashRegs, sizeof(regMaskTP) * TYP_COUNT);

codeGen->CopyRegisterInfo();
#endif // TARGET_XARCH
Expand Down
30 changes: 15 additions & 15 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11246,8 +11246,8 @@ class Compiler
//
// Users of these values need to define four accessor functions:
//
// SingleTypeRegSet get_RBM_ALLFLOAT();
// SingleTypeRegSet get_RBM_FLT_CALLEE_TRASH();
// regMaskTP get_RBM_ALLFLOAT();
// regMaskTP get_RBM_FLT_CALLEE_TRASH();
// unsigned get_CNT_CALLEE_TRASH_FLOAT();
// unsigned get_AVAILABLE_REG_COUNT();
//
Expand All @@ -11256,16 +11256,16 @@ class Compiler
// This was done to avoid polluting all `targetXXX.h` macro definitions with a compiler parameter, where only
// TARGET_AMD64 requires one.
//
SingleTypeRegSet rbmAllFloat;
SingleTypeRegSet rbmFltCalleeTrash;
unsigned cntCalleeTrashFloat;
regMaskTP rbmAllFloat;
regMaskTP rbmFltCalleeTrash;
unsigned cntCalleeTrashFloat;

public:
FORCEINLINE SingleTypeRegSet get_RBM_ALLFLOAT() const
FORCEINLINE regMaskTP get_RBM_ALLFLOAT() const
{
return this->rbmAllFloat;
}
FORCEINLINE SingleTypeRegSet get_RBM_FLT_CALLEE_TRASH() const
FORCEINLINE regMaskTP get_RBM_FLT_CALLEE_TRASH() const
{
return this->rbmFltCalleeTrash;
}
Expand All @@ -11284,8 +11284,8 @@ class Compiler
//
// Users of these values need to define four accessor functions:
//
// SingleTypeRegSet get_RBM_ALLMASK();
// SingleTypeRegSet get_RBM_MSK_CALLEE_TRASH();
// regMaskTP get_RBM_ALLMASK();
// regMaskTP get_RBM_MSK_CALLEE_TRASH();
// unsigned get_CNT_CALLEE_TRASH_MASK();
// unsigned get_AVAILABLE_REG_COUNT();
//
Expand All @@ -11294,17 +11294,17 @@ class Compiler
// This was done to avoid polluting all `targetXXX.h` macro definitions with a compiler parameter, where only
// TARGET_XARCH requires one.
//
SingleTypeRegSet rbmAllMask;
SingleTypeRegSet rbmMskCalleeTrash;
unsigned cntCalleeTrashMask;
SingleTypeRegSet varTypeCalleeTrashRegs[TYP_COUNT];
regMaskTP rbmAllMask;
regMaskTP rbmMskCalleeTrash;
unsigned cntCalleeTrashMask;
regMaskTP varTypeCalleeTrashRegs[TYP_COUNT];

public:
FORCEINLINE SingleTypeRegSet get_RBM_ALLMASK() const
FORCEINLINE regMaskTP get_RBM_ALLMASK() const
{
return this->rbmAllMask;
}
FORCEINLINE SingleTypeRegSet get_RBM_MSK_CALLEE_TRASH() const
FORCEINLINE regMaskTP get_RBM_MSK_CALLEE_TRASH() const
{
return this->rbmMskCalleeTrash;
}
Expand Down
Loading
Loading