[PATCH] D55974: [GVN] Update BlockRPONumber prior to use.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 7 14:57:22 PST 2019
efriedma added a comment.
This generally makes sense, I think.
The assumption here that blocks won't get erased during a GVN iteration is a little fragile... but probably okay. Please make BlockRPONumber a `DenseMap<AssertingVH<BasicBlock>, uint32_t>` to make sure no future change erases a block at an unexpected point.
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1652
+ // if some blocks have been split and added to F.
+ if (F.size() == BlockRPONumber.size())
+ return;
----------------
This doesn't have the performance characteristics you want: `F.size()` is linear in the size of the function. Please use an explicit boolean to track invalidation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55974/new/
https://reviews.llvm.org/D55974
More information about the llvm-commits
mailing list