[PATCH] D131592: [SampleProfile] Fix non-determinism in promoteMergeNotInlinedContextSamples()
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 10:45:34 PDT 2022
rnk added a comment.
I would argue that one doesn't need a test case for this. It is essentially dangerous to iterate a DenseMap and do transforms.
Is it possible to construct a test that fails in reverse iteration mode <https://lists.llvm.org/pipermail/llvm-dev/2017-July/115025.html>? Or, does an existing test fail in reverse iteration mode? If so, you can use that for test coverage instead.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1512
// Accumulate not inlined callsite information into notInlinedSamples
for (const auto &Pair : NonInlinedCallSites) {
+ CallBase *I = Pair.first;
----------------
This looks like the non-deterministic iteration
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131592/new/
https://reviews.llvm.org/D131592
More information about the llvm-commits
mailing list