Add helper methods and simplify cases where we want to check if two functions
are parent-child of each other (function-fragment relationship).
Details
- Reviewers
rafauler maksfb - Group Reviewers
Restricted Project - Commits
- rG068e9889b1ba: [BOLT] Add isParentOf and isParentOrChildOf BF checks
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
bolt/include/bolt/Core/BinaryFunction.h | ||
---|---|---|
1766 | sibling? |
bolt/include/bolt/Core/BinaryFunction.h | ||
---|---|---|
1766 | Yes, it's a bit confusing term, but it's useful in context of stripped binaries where we can't tell which function is a parent and which is a child, hence sibling (as we treat them as equal). For parent-child relationship, I don't know of a good unambiguous term: "isRelativeOf"? Kins? isParentOrChildOf? I would go with sibling unless you strongly disagree. |
bolt/include/bolt/Core/BinaryFunction.h | ||
---|---|---|
1766 | I think "sibling" introduces more confusion than helps, but you can ask what's Maksim's take on this if you would like to keep sibling. After you explained, I get why you chose this name, but for someone reading this with no context, it's not clear the intent is to treat them as equals, someone might read this as if you were trying to say these two fragments have a common parent. For the lack of a better word, I would go with "isParentOrChildOf()" |
sibling?