[PATCH] D123669: [ArgPromotion] Use a Visited set to protect dead instruction collection

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 04:08:46 PDT 2022


psamolysov updated this revision to Diff 426013.
psamolysov retitled this revision from "[ArgPromotion] Use SmallVector to traverse values" to "[ArgPromotion] Use a Visited set to protect dead instruction collection".
psamolysov edited the summary of this revision.
psamolysov added a comment.

> Better to stay safe IMHO.

To stay safe, I propose the following change: to add the `Visited` set to the dead instruction searching in the `doPromotion` function too. This makes the code consistent: two used graph traversing algorithms will look similar.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123669

Files:
  llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
  llvm/test/Transforms/ArgumentPromotion/diamond-graph-no-promotion.ll
  llvm/test/Transforms/ArgumentPromotion/phi-loop-no-arg-promotion.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123669.426013.patch
Type: text/x-patch
Size: 5418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220429/59836c1d/attachment.bin>


More information about the llvm-commits mailing list