[PATCH] D84220: [IPSCCP] Fix a bug that the "returned" attribute is not cleared when function is optimized to return undef

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 16:58:11 PDT 2020


congzhe added a comment.

In D84220#2203480 <https://reviews.llvm.org/D84220#2203480>, @jdoerfert wrote:

> The assertion doesn't work alone. I would still prefer not to skip over non-call sites blindly. @fhahn in addition to blockaddr users, do we expect anything else? We can skip those just fine.

Thank you, now skipped over blockaddr users.

In D84220#2203014 <https://reviews.llvm.org/D84220#2203014>, @fhahn wrote:

> Looks like the line numbers in my previous comment got messed up. I let them at an earlier version that actually contained the code. It would be good if you could update the patch with a squashed version of all changes.

Thanks for the comment, now squashed all commits into a single one.



================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:2044
+    // Record all functions that are zapped
+    if (FuncZappedReturn.find(F) == FuncZappedReturn.end())
+      FuncZappedReturn.insert(F);
----------------
fhahn wrote:
> I don't think you need the check, `insert` should only add the function if it is not already present.
Thank you, now used SmallSetVector and removed the check.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84220/new/

https://reviews.llvm.org/D84220



More information about the llvm-commits mailing list