Skip to content

Commit 569868f

Browse files
committed
[SCCP] Only track returns of functions with non-void ret ty (NFC).
There is no need to add functions with void return types to the set of tracked return values. This does not change functionality, because we such functions do not have return values and we never update or access them.
1 parent 60433c6 commit 569868f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/SCCP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class SCCPSolver : public InstVisitor<SCCPSolver> {
233233
for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i)
234234
TrackedMultipleRetVals.insert(
235235
std::make_pair(std::make_pair(F, i), ValueLatticeElement()));
236-
} else
236+
} else if (!F->getReturnType()->isVoidTy())
237237
TrackedRetVals.insert(std::make_pair(F, ValueLatticeElement()));
238238
}
239239

0 commit comments

Comments
 (0)