[llvm] [memprof] Teach extractCallsFromIR to recognize heap allocation functions (PR #115938)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 13:52:19 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) {
----------------
kazutakahirata wrote:
The only reason I am passing `GetTLI` is because `getResult` takes a function:
```
FAM.getResult<TargetLibraryAnalysis>(F);
```
I don't know if `TLI` actually depends on the function being passed.
https://github.com/llvm/llvm-project/pull/115938
More information about the llvm-commits
mailing list