[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 09:19:59 PDT 2024


================
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU,
   return true;
 }
 
+void SCCPSolver::inferReturnAttributes() const {
+  for (const auto &I : getTrackedRetVals()) {
+    Function *F = I.first;
+    const ValueLatticeElement &ReturnValue = I.second;
----------------
dtcxzyw wrote:

```suggestion
  for (const auto &[F, ReturnValue] : getTrackedRetVals()) {
```

https://github.com/llvm/llvm-project/pull/106732


More information about the cfe-commits mailing list