File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ class AMDGPUInformationCache : public InformationCache {
262262 return !HasAperture && (Access & ADDR_SPACE_CAST);
263263 }
264264
265- bool constHasASCastFromPrivate (const Constant *C, Function &Fn ) {
265+ bool checkConstForAddrSpaceCastFromPrivate (const Constant *C) {
266266 SmallPtrSet<const Constant *, 8 > Visited;
267267 uint8_t Access = getConstantAccess (C, Visited);
268268
@@ -706,8 +706,8 @@ struct AAAMDAttributesFunction : public AAAMDAttributes {
706706
707707 // Check all AddrSpaceCast instructions. FlatScratchInit is needed if
708708 // there is a cast from PRIVATE_ADDRESS.
709- auto AddrSpaceCastNotFromPrivate = [& ](Instruction &I) {
710- return static_cast <AddrSpaceCastInst & >(I).getSrcAddressSpace () !=
709+ auto AddrSpaceCastNotFromPrivate = [](Instruction &I) {
710+ return cast <AddrSpaceCastInst>(I).getSrcAddressSpace () !=
711711 AMDGPUAS::PRIVATE_ADDRESS;
712712 };
713713
@@ -724,7 +724,7 @@ struct AAAMDAttributesFunction : public AAAMDAttributes {
724724 for (Instruction &I : instructions (F)) {
725725 for (const Use &U : I.operands ()) {
726726 if (const auto *C = dyn_cast<Constant>(U)) {
727- if (InfoCache.constHasASCastFromPrivate (C, *F ))
727+ if (InfoCache.checkConstForAddrSpaceCastFromPrivate (C ))
728728 return true ;
729729 }
730730 }
You can’t perform that action at this time.
0 commit comments