[llvm] [memprof] Teach extractCallsFromIR to recognize heap allocation functions (PR #115938)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 13:28:16 PST 2024


================
@@ -795,8 +795,8 @@ struct AllocMatchInfo {
   bool Matched = false;
 };
 
-DenseMap<uint64_t, SmallVector<CallEdgeTy, 0>>
-memprof::extractCallsFromIR(Module &M) {
+DenseMap<uint64_t, SmallVector<CallEdgeTy, 0>> memprof::extractCallsFromIR(
+    Module &M, function_ref<const TargetLibraryInfo &(Function &)> GetTLI) {
----------------
snehasish wrote:

TLI isn't going to change depending on when you call it. Can we just pass it as `const TargetLibraryInfo&`?

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


More information about the llvm-commits mailing list