[PATCH] D57033: [LCSSA] Handle case with single new PHI faster.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 13:50:59 PST 2019
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LCSSA.cpp:205
+ if (UseToRewrite->get()->hasValueHandle())
+ ValueHandleBase::ValueIsRAUWd(*UseToRewrite, AddedPHIs[0]);
+ UseToRewrite->set(AddedPHIs[0]);
----------------
Maybe worth mentioning that this can call ValueIsRAUWd multiple times for the same value. (I don't think it's a problem, but took me a minute to understand what this is doing.)
================
Comment at: llvm/lib/Transforms/Utils/LCSSA.cpp:226
+ Value *V = AddedPHIs.size() == 1 ? AddedPHIs[0]
+ : SSAUpdate.FindValueForBlock(UserBB);
+ DVI->setOperand(0, MetadataAsValue::get(Ctx, ValueAsMetadata::get(V)));
----------------
I'm not sure I understand why you're changing the logic here for the `AddedPHIs.size() != 1` case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57033/new/
https://reviews.llvm.org/D57033
More information about the llvm-commits
mailing list