[BOLT] Switch to using layout order in YAML
authorAmir Ayupov <aaupov@fb.com>
Tue, 18 Jul 2023 21:29:34 +0000 (14:29 -0700)
committerAmir Ayupov <aaupov@fb.com>
Tue, 18 Jul 2023 21:33:41 +0000 (14:33 -0700)
commit69b7e257fec679e3e725868b89318809821b2a23
tree1fb39bce316c461d6e96271d5bfc034d3f3050d3
parent599e0da32f851401607206ef950a49cf2e67aa2d
[BOLT] Switch to using layout order in YAML

Use layout order in YAML profile reading/writing. Preserve old behavior (DFS order)
under `-profile-use-dfs` option.

Reviewed By: spupyrev

Differential Revision: https://reviews.llvm.org/D155514
bolt/lib/Profile/YAMLProfileReader.cpp
bolt/lib/Profile/YAMLProfileWriter.cpp
bolt/test/X86/pre-aggregated-perf.test
bolt/test/X86/reader-stale-yaml.test