================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits