[llvm] [memprof] Add extractCallsFromIR (PR #115218)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 12:10:54 PST 2024


================
@@ -795,6 +795,53 @@ struct AllocMatchInfo {
   bool Matched = false;
 };
 
+DenseMap<uint64_t, SmallVector<CallEdgeTy, 0>>
+memprof::extractCallsFromIR(Module &M) {
+  DenseMap<uint64_t, SmallVector<CallEdgeTy, 0>> Calls;
+
+  auto GetOffset = [](const DILocation *DIL) {
----------------
kazutakahirata wrote:

I see `LineLocation` as a container and as a nicer version of `std::pair` where the fields are more appropriately named than `first` and `second`.  If I put an absolute line number in there, I would like to see the same absolute line number come out, but then the absolute line number isn't really useful in our context.


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


More information about the llvm-commits mailing list