Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a7b22ca

Browse files
committed
Fix MacOS build break
[tfs-changeset: 1434447]
1 parent 50ad180 commit a7b22ca

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

src/jit/valuenum.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,6 @@ ValueNumStore::ValueNumStore(Compiler* comp, IAllocator* alloc)
8787
m_mapSelectBudget = fMapSelBudget.val(CLRConfig::INTERNAL_JitVNMapSelBudget);
8888
}
8989

90-
template <typename T>
91-
T ValueNumStore::CoerceTypRefToT(Chunk* c, unsigned offset)
92-
{
93-
noway_assert(sizeof(T) >= sizeof(VarTypConv<TYP_REF>::Type));
94-
return (T) reinterpret_cast<VarTypConv<TYP_REF>::Type*>(c->m_defs)[offset];
95-
}
96-
97-
template <>
98-
float ValueNumStore::CoerceTypRefToT<float>(Chunk* c, unsigned offset)
99-
{
100-
unreached();
101-
}
102-
103-
template <>
104-
double ValueNumStore::CoerceTypRefToT<double>(Chunk* c, unsigned offset)
105-
{
106-
unreached();
107-
}
108-
10990
// static.
11091
template<typename T>
11192
T ValueNumStore::EvalOp(VNFunc vnf, T v0)

src/jit/valuenum.h

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ class ValueNumStore
155155

156156
// Returns "true" iff gtOper is a legal value number function.
157157
// (Requires InitValueNumStoreStatics to have been run.)
158-
static inline bool GenTreeOpIsLegalVNFunc(genTreeOps gtOper);
158+
static bool GenTreeOpIsLegalVNFunc(genTreeOps gtOper);
159159

160160
// Returns "true" iff "vnf" is a commutative (and thus binary) operator.
161161
// (Requires InitValueNumStoreStatics to have been run.)
162-
static inline bool VNFuncIsCommutative(VNFunc vnf);
162+
static bool VNFuncIsCommutative(VNFunc vnf);
163163

164164
// Returns "true" iff "vnf" is a comparison (and thus binary) operator.
165-
static inline bool VNFuncIsComparison(VNFunc vnf);
165+
static bool VNFuncIsComparison(VNFunc vnf);
166166

167167
// Returns "true" iff "vnf" can be evaluated for constant arguments.
168-
static inline bool CanEvalForConstantArgs(VNFunc vnf);
168+
static bool CanEvalForConstantArgs(VNFunc vnf);
169169

170170
// return vnf(v0)
171171
template<typename T>
@@ -1176,24 +1176,43 @@ class ValueNumStore
11761176
// Inline functions.
11771177

11781178
// static
1179-
bool ValueNumStore::GenTreeOpIsLegalVNFunc(genTreeOps gtOper)
1179+
inline bool ValueNumStore::GenTreeOpIsLegalVNFunc(genTreeOps gtOper)
11801180
{
11811181
return (s_vnfOpAttribs[gtOper] & VNFOA_IllegalGenTreeOp) == 0;
11821182
}
11831183

11841184
// static
1185-
bool ValueNumStore::VNFuncIsCommutative(VNFunc vnf)
1185+
inline bool ValueNumStore::VNFuncIsCommutative(VNFunc vnf)
11861186
{
11871187
return (s_vnfOpAttribs[vnf] & VNFOA_Commutative) != 0;
11881188
}
11891189

1190-
bool ValueNumStore::VNFuncIsComparison(VNFunc vnf)
1190+
inline bool ValueNumStore::VNFuncIsComparison(VNFunc vnf)
11911191
{
11921192
if (vnf >= VNF_Boundary) return false;
11931193
genTreeOps gtOp = genTreeOps(vnf);
11941194
return GenTree::OperIsCompare(gtOp) != 0;
11951195
}
11961196

1197+
template <typename T>
1198+
inline T ValueNumStore::CoerceTypRefToT(Chunk* c, unsigned offset)
1199+
{
1200+
noway_assert(sizeof(T) >= sizeof(VarTypConv<TYP_REF>::Type));
1201+
return (T) reinterpret_cast<VarTypConv<TYP_REF>::Type*>(c->m_defs)[offset];
1202+
}
1203+
1204+
template <>
1205+
inline float ValueNumStore::CoerceTypRefToT<float>(Chunk* c, unsigned offset)
1206+
{
1207+
unreached();
1208+
}
1209+
1210+
template <>
1211+
inline double ValueNumStore::CoerceTypRefToT<double>(Chunk* c, unsigned offset)
1212+
{
1213+
unreached();
1214+
}
1215+
11971216
/*****************************************************************************/
11981217
#endif // _VALUENUM_H_
11991218
/*****************************************************************************/

0 commit comments

Comments
 (0)