Use layout order in YAML profile reading/writing. Preserve old behavior (DFS order)
under -profile-use-dfs option.
Details
- Reviewers
spupyrev rafauler maksfb - Group Reviewers
Restricted Project - Commits
- rG69b7e257fec6: [BOLT] Switch to using layout order in YAML
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
bolt/lib/Profile/YAMLProfileReader.cpp | ||
---|---|---|
109 | Is there a reason why the type is not BinaryFunction::BasicBlockOrderType but an explicit SmallVector? Also I'm not sure if there is any advantage here to use SmallVector over std::vector, as the order is always non-empty. |
bolt/lib/Profile/YAMLProfileReader.cpp | ||
---|---|---|
109 | You're right, can just use that type alias. I thought to use a SmallVector<const BinaryBasicBlock *, 0> version in YAMLWriter but let's keep them uniform between reader and writer. Regarding std::vector: it used to be it, but Maksim changed to ADT type citing BinaryFunction size reduction. |
Since you are changing the default behavior, retitle the diff to reflect that fact. Otherwise LGTM.
Is there a reason why the type is not BinaryFunction::BasicBlockOrderType but an explicit SmallVector?
Also I'm not sure if there is any advantage here to use SmallVector over std::vector, as the order is always non-empty.