[PATCH] D81030: [JumpThreading] Simplify FindMostPopularDest (NFC)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 17:02:23 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:1490
+ for (auto *SuccBB : successors(BB))
+ DestPopularity[SuccBB] = 0;
+
----------------
Initializing DestPopularity like this should be unnecessary, I think; as long as the ordering of PredToDestList is deterministic, the ordering of the resulting MapVector should also be deterministic.
Can we just assert `!DestPopularity.empty()`, instead of messing with nullptr? If PredToDestList is non-empty, DestPopularity should also be non-empty.over inserting nullptr; inserting nullptr simplifies the control flow, but it's not intuitive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81030/new/
https://reviews.llvm.org/D81030
More information about the llvm-commits
mailing list