[llvm-branch-commits] [llvm] [llvm-readobj][ELF] Print call graph callees in section order (PR #230649)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 12 10:49:31 PDT 2026
================
@@ -181,13 +181,22 @@ struct GroupSection {
std::vector<GroupMember> Members;
};
+// A function referenced by a SHT_LLVM_CALL_GRAPH section entry: the function
+// that the entry describes, or one of its direct callees.
+struct CallGraphFunc {
+ // The offset of the address field within the section.
+ uint64_t FieldOffset = 0;
+ // The value stored in the address field.
+ uint64_t FieldValue = 0;
+};
+
// Per-function call graph information.
struct FunctionCallGraphInfo {
- uint64_t FunctionAddress;
+ CallGraphFunc Entry;
uint8_t FormatVersionNumber;
bool IsIndirectTarget;
uint64_t FunctionTypeID;
- SmallSet<uint64_t, 4> DirectCallees;
+ SmallVector<CallGraphFunc, 4> DirectCallees;
----------------
ilovepi wrote:
SetVector is also a possibility. That keeps the iteration order as insertion order, though. If that has the right semantics for you, you could consider it and not worry about allocating the set later.
https://github.com/llvm/llvm-project/pull/230649
More information about the llvm-branch-commits
mailing list