[MC] Make .pseudo_probe created sections deterministic after D91878
MCPseudoProbeSections::emit iterates over MCProbeDivisions and creates sections. When the map key is MCSymbol *, the iteration order is not stable. The underlying BumpPtrAllocator largely decreases the flakiness. That said, two elements may sit in two different allocations from BumpPtrAllocator, with an unpredictable order. Under tcmalloc, llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll fails about 7 times per 1000 runs.
Loading
Please sign in to comment