@@ -2027,11 +2027,11 @@ class LinearScan : public LinearScanInterface
2027
2027
regMaskTP rbmAllFloat;
2028
2028
regMaskTP rbmFltCalleeTrash;
2029
2029
2030
- regMaskTP get_RBM_ALLFLOAT() const
2030
+ FORCEINLINE regMaskTP get_RBM_ALLFLOAT() const
2031
2031
{
2032
2032
return this->rbmAllFloat;
2033
2033
}
2034
- regMaskTP get_RBM_FLT_CALLEE_TRASH() const
2034
+ FORCEINLINE regMaskTP get_RBM_FLT_CALLEE_TRASH() const
2035
2035
{
2036
2036
return this->rbmFltCalleeTrash;
2037
2037
}
@@ -2041,19 +2041,19 @@ class LinearScan : public LinearScanInterface
2041
2041
regMaskTP rbmAllMask;
2042
2042
regMaskTP rbmMskCalleeTrash;
2043
2043
2044
- regMaskTP get_RBM_ALLMASK() const
2044
+ FORCEINLINE regMaskTP get_RBM_ALLMASK() const
2045
2045
{
2046
2046
return this->rbmAllMask;
2047
2047
}
2048
- regMaskTP get_RBM_MSK_CALLEE_TRASH() const
2048
+ FORCEINLINE regMaskTP get_RBM_MSK_CALLEE_TRASH() const
2049
2049
{
2050
2050
return this->rbmMskCalleeTrash;
2051
2051
}
2052
2052
#endif // TARGET_XARCH
2053
2053
2054
2054
unsigned availableRegCount;
2055
2055
2056
- unsigned get_AVAILABLE_REG_COUNT() const
2056
+ FORCEINLINE unsigned get_AVAILABLE_REG_COUNT() const
2057
2057
{
2058
2058
return this->availableRegCount;
2059
2059
}
@@ -2064,7 +2064,7 @@ class LinearScan : public LinearScanInterface
2064
2064
// NOTE: we currently don't need a LinearScan `this` pointer for this definition, and some callers
2065
2065
// don't have one available, so make is static.
2066
2066
//
2067
- static regMaskTP calleeSaveRegs(RegisterType rt)
2067
+ static FORCEINLINE regMaskTP calleeSaveRegs(RegisterType rt)
2068
2068
{
2069
2069
static const regMaskTP varTypeCalleeSaveRegs[] = {
2070
2070
#define DEF_TP(tn, nm, jitType, sz, sze, asze, st, al, regTyp, regFld, csr, ctr, tf) csr,
@@ -2076,16 +2076,25 @@ class LinearScan : public LinearScanInterface
2076
2076
return varTypeCalleeSaveRegs[rt];
2077
2077
}
2078
2078
2079
+ #if defined(TARGET_XARCH)
2080
+ // Not all of the callee trash values are constant, so don't declare this as a method local static
2081
+ // doing so results in significantly more complex codegen and we'd rather just initialize this once
2082
+ // as part of initializing LSRA instead
2083
+ regMaskTP varTypeCalleeTrashRegs[TYP_COUNT];
2084
+ #endif // TARGET_XARCH
2085
+
2079
2086
//------------------------------------------------------------------------
2080
2087
// callerSaveRegs: Get the set of caller-save registers of the given RegisterType
2081
2088
//
2082
- regMaskTP callerSaveRegs(RegisterType rt) const
2089
+ FORCEINLINE regMaskTP callerSaveRegs(RegisterType rt) const
2083
2090
{
2091
+ #if !defined(TARGET_XARCH)
2084
2092
static const regMaskTP varTypeCalleeTrashRegs[] = {
2085
2093
#define DEF_TP(tn, nm, jitType, sz, sze, asze, st, al, regTyp, regFld, csr, ctr, tf) ctr,
2086
2094
#include "typelist.h"
2087
2095
#undef DEF_TP
2088
2096
};
2097
+ #endif // !TARGET_XARCH
2089
2098
2090
2099
assert((unsigned)rt < ArrLen(varTypeCalleeTrashRegs));
2091
2100
return varTypeCalleeTrashRegs[rt];
0 commit comments