[PATCH] D48369: [CodeGen] Make block removal order deterministic in CodeGenPrepare
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 07:40:49 PDT 2018
fhahn added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:468
+ // are removed.
+ SmallSetVector<BasicBlock*, 8> WorkList;
for (BasicBlock &BB : F) {
----------------
IIUC for each BB we look at the successor and only add a successor to the worklist, if it has exactly one predecessor, right? Doesn't that mean we only ever add each BB once and there wouldn't be a need for a set?
Repository:
rL LLVM
https://reviews.llvm.org/D48369
More information about the llvm-commits
mailing list