[PATCH] D106720: [Attributor] AAFunctionReachability, Instruction reachability.
Kuter Dinel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 20:42:30 PDT 2021
kuter added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:9468-9470
+ for (auto It = Set.Unreachable.begin(); It != Set.Unreachable.end();) {
+ Function *Fn = *It;
+ It++;
----------------
jdoerfert wrote:
> Why no range loop?
`markReachable` call below erases `Fn` from the set we are iterating right now.
I increment the iterator before processing `Fn` in case `Fn` gets removed from the `Unreachable` set.
It would be invalid to increment the iterator if Fn was already deleted right ? I think we have to do that before.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106720/new/
https://reviews.llvm.org/D106720
More information about the llvm-commits
mailing list