mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 11:56:06 +00:00

After https://github.com/llvm/llvm-project/pull/131217 was submitted, time-passes.ll fails because `opt` prints `-time-report` when `ManagedTimerGlobals` is destroyed. `ManagedTimerGlobals` stores `TimerGroup`s in an unordered map, so the ordering of the output `TimerGroup`s depends on the underlying iterator. To fix this, we do what Clang does and use `llvm::TimerGroup::printAll(...)`, which *is* deterministic. This is also what Clang does. This does put move analysis section before the pass section for `-time-report`, but again, this is also what Clang currently does.