[PATCH] D98122: [rs4gc] don't duplicate existing values which are provably base pointers
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 01:29:07 PST 2021
skatkov added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:902
+ bool Progress = true;
+ while (Progress) {
+ Progress = false;
----------------
why not
do {} while(!ToRemove.empty());
?
================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:918
+ if (SelectInst *SI = dyn_cast<SelectInst>(BDV)) {
+ CanPrune &= canPruneInput(SI->getTrueValue());
+ CanPrune &= canPruneInput(SI->getFalseValue());
----------------
not a fan of &= operation. It will require to execute the function call even if CanPrune is already false.
Please replace with &&.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98122/new/
https://reviews.llvm.org/D98122
More information about the llvm-commits
mailing list