[PATCH] D138238: [SROA] Change how we speculate `load`s of `select`s -- split block, insert then/else blocks, form two-entry PHI node
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 14:11:53 PST 2022
lebedev.ri added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Scalar/SROA.h:106-109
- /// All of these select instructions have been checked for the safety of
- /// speculation and by being speculated will allow promoting allocas
- /// currently in the promotable queue.
- SetVector<SelectInst *, SmallVector<SelectInst *, 2>> SpeculatableSelects;
----------------
arsenm wrote:
> Are there any cases where this should still try to speculate?
I'm not sure i understand the question.
As it can be seen from the rest of the diff here,
for select's, we will always form diamond control flow and two-entry phi node,
and never check if we can speculate load.
For PHI's, we still speculate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138238/new/
https://reviews.llvm.org/D138238
More information about the llvm-commits
mailing list