[all-commits] [llvm/llvm-project] 0ca6b2: [MemProf] Fix an incorrect iterator increment (#12...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Tue Jan 21 11:31:50 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ca6b2b0cc3a90e14da56a56bdfcf9911896ed4a
      https://github.com/llvm/llvm-project/commit/0ca6b2b0cc3a90e14da56a56bdfcf9911896ed4a
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

  Log Message:
  -----------
  [MemProf] Fix an incorrect iterator increment (#123438)

We pass in a pointer to an Edge iterator to
moveEdgeToExistingCalleeClone, so that it can be correctly updated when
we remove edges during an edge iteration. We were not dereferencing this
pointer in one case, meaning we would increment the pointer and not the
iterator as intended.

This did not cause any issues, as it turns out that we would simply skip
the edge on the next iteration as it was already appropriately handled.
While in theory this incurred some extra compilation time, in practice
for a large application the effect was not significant. I confirmed that
there was no effect to any cloning from the fix.

I plan to send a follow up change to avoid the need to pass in an
iterator at all and simplify / consolidate the handling in the caller,
but want to fix this in case something requires a revert of the follow
on fix.



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