[PATCH] D85547: [Attributor] Provide an edge-based interface in AAIsDead
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 12:30:34 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:2654
+ return SetVector<const BasicBlock *>(succ_begin(&BB), succ_end(&BB));
+ }
+
----------------
This will create (and below copy) these vectors all the time, that should be avoided. Can we instead make this a wrapper around `succ_begin`, e.g., you ask for a successor iterator only for live edges, and you can use it with `succ_end`. Basically, return an iterator that skips dead edges.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85547/new/
https://reviews.llvm.org/D85547
More information about the llvm-commits
mailing list