@@ -235,6 +235,7 @@ static bool isRegisterVectorType(LLT Ty) {
235
235
EltSize == 128 || EltSize == 256 ;
236
236
}
237
237
238
+ // TODO: replace all uses of isRegisterType with isRegisterClassType
238
239
static bool isRegisterType (LLT Ty) {
239
240
if (!isRegisterSize (Ty.getSizeInBits ()))
240
241
return false ;
@@ -342,7 +343,8 @@ static LLT GetAddrSpacePtr(unsigned AS, const GCNTargetMachine &TM) {
342
343
return LLT::pointer (AS, TM.getPointerSizeInBits (AS));
343
344
}
344
345
345
- static bool isRegType (LLT Ty, const GCNTargetMachine &TM) {
346
+ // Checks whether a type is in the list of legal register types.
347
+ static bool isRegisterClassType (LLT Ty, const GCNTargetMachine &TM) {
346
348
const LLT GlobalPtr = GetAddrSpacePtr (AMDGPUAS::GLOBAL_ADDRESS, TM);
347
349
const LLT LocalPtr = GetAddrSpacePtr (AMDGPUAS::LOCAL_ADDRESS, TM);
348
350
const LLT FlatPtr = GetAddrSpacePtr (AMDGPUAS::FLAT_ADDRESS, TM);
@@ -363,10 +365,10 @@ static bool isRegType(LLT Ty, const GCNTargetMachine &TM) {
363
365
typeInSet (Ty, AllPtrTypes) || Ty.isPointer ();
364
366
}
365
367
366
- static LegalityPredicate isRegType (unsigned TypeIdx,
368
+ static LegalityPredicate isRegisterClassType (unsigned TypeIdx,
367
369
const GCNTargetMachine &TM) {
368
370
return [TypeIdx, &TM](const LegalityQuery &Query) {
369
- return isRegType (Query.Types [TypeIdx], TM);
371
+ return isRegisterClassType (Query.Types [TypeIdx], TM);
370
372
};
371
373
}
372
374
@@ -860,7 +862,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
860
862
861
863
getActionDefinitionsBuilder (G_BITCAST)
862
864
// Don't worry about the size constraint.
863
- .legalIf (all (isRegType (0 , TM), isRegType (1 , TM)))
865
+ .legalIf (all (isRegisterClassType (0 , TM), isRegisterClassType (1 , TM)))
864
866
.lower ();
865
867
866
868
getActionDefinitionsBuilder (G_CONSTANT)
0 commit comments