We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d9dfa4 + ddb88c9 commit c7a59c3Copy full SHA for c7a59c3
lib/SILOptimizer/IPO/GlobalOpt.cpp
@@ -910,16 +910,14 @@ void SILGlobalOpt::collectGlobalAccess(GlobalAddrInst *GAI) {
910
if (!SILG->getDecl())
911
return;
912
913
- SILValue V = GAI;
914
- for (auto Use : getNonDebugUses(V)) {
915
-
916
- if (auto *SI = dyn_cast<StoreInst>(Use->getUser())) {
+ for (auto *Op : getNonDebugUses(GAI)) {
+ if (auto *SI = dyn_cast<StoreInst>(Op->getUser())) {
917
if (SI->getDest() == GAI)
918
collectGlobalStore(SI, SILG);
919
continue;
920
}
921
922
- if (auto *Load = getValidLoad(Use->getUser(), GAI)) {
+ if (auto *Load = getValidLoad(Op->getUser(), GAI)) {
923
collectGlobalLoad(Load, SILG);
924
925
0 commit comments