@@ -2027,11 +2027,11 @@ class LinearScan : public LinearScanInterface
20272027 regMaskTP rbmAllFloat;
20282028 regMaskTP rbmFltCalleeTrash;
20292029
2030- regMaskTP get_RBM_ALLFLOAT () const
2030+ FORCEINLINE regMaskTP get_RBM_ALLFLOAT () const
20312031 {
20322032 return this ->rbmAllFloat ;
20332033 }
2034- regMaskTP get_RBM_FLT_CALLEE_TRASH () const
2034+ FORCEINLINE regMaskTP get_RBM_FLT_CALLEE_TRASH () const
20352035 {
20362036 return this ->rbmFltCalleeTrash ;
20372037 }
@@ -2041,19 +2041,19 @@ class LinearScan : public LinearScanInterface
20412041 regMaskTP rbmAllMask;
20422042 regMaskTP rbmMskCalleeTrash;
20432043
2044- regMaskTP get_RBM_ALLMASK () const
2044+ FORCEINLINE regMaskTP get_RBM_ALLMASK () const
20452045 {
20462046 return this ->rbmAllMask ;
20472047 }
2048- regMaskTP get_RBM_MSK_CALLEE_TRASH () const
2048+ FORCEINLINE regMaskTP get_RBM_MSK_CALLEE_TRASH () const
20492049 {
20502050 return this ->rbmMskCalleeTrash ;
20512051 }
20522052#endif // TARGET_XARCH
20532053
20542054 unsigned availableRegCount;
20552055
2056- unsigned get_AVAILABLE_REG_COUNT () const
2056+ FORCEINLINE unsigned get_AVAILABLE_REG_COUNT () const
20572057 {
20582058 return this ->availableRegCount ;
20592059 }
@@ -2064,7 +2064,7 @@ class LinearScan : public LinearScanInterface
20642064 // NOTE: we currently don't need a LinearScan `this` pointer for this definition, and some callers
20652065 // don't have one available, so make is static.
20662066 //
2067- static regMaskTP calleeSaveRegs (RegisterType rt)
2067+ static FORCEINLINE regMaskTP calleeSaveRegs (RegisterType rt)
20682068 {
20692069 static const regMaskTP varTypeCalleeSaveRegs[] = {
20702070#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
20762076 return varTypeCalleeSaveRegs[rt];
20772077 }
20782078
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+
20792086 // ------------------------------------------------------------------------
20802087 // callerSaveRegs: Get the set of caller-save registers of the given RegisterType
20812088 //
2082- regMaskTP callerSaveRegs (RegisterType rt) const
2089+ FORCEINLINE regMaskTP callerSaveRegs (RegisterType rt) const
20832090 {
2091+ #if !defined(TARGET_XARCH)
20842092 static const regMaskTP varTypeCalleeTrashRegs[] = {
20852093#define DEF_TP (tn, nm, jitType, sz, sze, asze, st, al, regTyp, regFld, csr, ctr, tf ) ctr,
20862094#include " typelist.h"
20872095#undef DEF_TP
20882096 };
2097+ #endif // !TARGET_XARCH
20892098
20902099 assert ((unsigned )rt < ArrLen (varTypeCalleeTrashRegs));
20912100 return varTypeCalleeTrashRegs[rt];
0 commit comments