Skip to content

Commit debf11f

Browse files
committed
Early return in getLocForInst()
1 parent 7e6f960 commit debf11f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,14 +1272,15 @@ struct DSEState {
12721272
return Locations;
12731273
}
12741274

1275-
if (auto Loc = getLocForWrite(I))
1276-
Locations.push_back(std::make_pair(*Loc, false));
1277-
12781275
if (ConsiderInitializesAttr) {
12791276
for (auto &MemLoc : getInitializesArgMemLoc(I, BatchAA)) {
12801277
Locations.push_back(std::make_pair(MemLoc, true));
12811278
}
1279+
return Locations;
12821280
}
1281+
1282+
if (auto Loc = getLocForWrite(I))
1283+
Locations.push_back(std::make_pair(*Loc, false));
12831284
return Locations;
12841285
}
12851286

0 commit comments

Comments
 (0)