[llvm-branch-commits] [llvm] [BOLT] Add pseudo probe inline tree to YAML profile (PR #107137)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 12 15:17:27 PDT 2024


aaupov wrote:

> Not an expert but looks good. Why is operator== in struct InlineTreeInfo always returning false? Is this intentional?

It's a quirk of YAML: `BinaryFunctionProfile` has `std::vector<InlineTreeNode> InlineTree` as optional field. Optional fields compare against the default value using `operator==`, which for vector transitively requires `operator==` for `InlineTreeNode`. However the default value for `InlineTree` is empty vector, so no `InlineTreeNode` comparison is actually necessary. Hence we just say that `InlineTreeNode::operator==` is false.

https://github.com/llvm/llvm-project/pull/107137


More information about the llvm-branch-commits mailing list