[PATCH] D69470: [ExpandReductions] Don't push all intrinsics to the worklist. Just push reductions.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 20:10:58 PST 2019
craig.topper marked an inline comment as done.
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/ExpandReductions.cpp:81
SmallVector<IntrinsicInst *, 4> Worklist;
- for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
- if (auto II = dyn_cast<IntrinsicInst>(&*I))
- Worklist.push_back(II);
+ for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
+ if (auto II = dyn_cast<IntrinsicInst>(&*I)) {
----------------
spatel wrote:
> Could reduce with something like:
> for (auto &I : instructions(F)) {
>
> Note - either way, this pass may be in danger of dying if used on unreachable blocks that contain weird IR.
> See for example: D67766
Does the UnreachableBlockEliminationPass that we run earlier in the codegen pipeline help prevent that?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69470/new/
https://reviews.llvm.org/D69470
More information about the llvm-commits
mailing list