[all-commits] [llvm/llvm-project] 2cdf47: [MemProf] Merge callee clones as needed before ass...
Teresa Johnson via All-commits
all-commits at lists.llvm.org
Mon Apr 21 17:05:56 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2cdf474f12090919e5b14c6ef922e5d5df407418
https://github.com/llvm/llvm-project/commit/2cdf474f12090919e5b14c6ef922e5d5df407418
Author: Teresa Johnson <tejohnson at google.com>
Date: 2025-04-21 (Mon, 21 Apr 2025)
Changed paths:
M llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
A llvm/test/Transforms/MemProfContextDisambiguation/mergenodes.ll
A llvm/test/Transforms/MemProfContextDisambiguation/mergenodes2.ll
M llvm/test/Transforms/MemProfContextDisambiguation/overlapping-contexts.ll
Log Message:
-----------
[MemProf] Merge callee clones as needed before assigning functions (#135702)
We perform cloning for each allocation node separately. However, this
sometimes results in a situation where the same node calls multiple
clones of the same callee, created for different allocations. This
causes issues when assigning functions to these clones, as each node can
in reality only call a single callee clone.
To address this, before assigning functions, merge callee clone nodes as
needed using a post order traversal from the allocations. We attempt to
use existing clones as the merge node when legal, and to share them
among callers with the same properties (callers calling the same set of
callee clone nodes for the same allocations).
Without this fix, in some cases incorrect function assignment will lead
to calling the wrong allocation clone. In fact, this showed up in an
existing test, that I didn't notice as it existed to test earlier parts
of the cloning process.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list