[all-commits] [llvm/llvm-project] 144ddc: [MemProf] Avoid duplicate edges between nodes (#11...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri Oct 25 11:10:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 144ddca9ed6a439ad8a421c3ff2ea763532341ba
      https://github.com/llvm/llvm-project/commit/144ddca9ed6a439ad8a421c3ff2ea763532341ba
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
    M llvm/test/ThinLTO/X86/memprof-icp.ll

  Log Message:
  -----------
  [MemProf] Avoid duplicate edges between nodes (#113337)

The recent change to add support for cloning indirect calls
inadvertantly caused duplicate edges to be created between the same
caller/callee pair. This is due to the new moveCalleeEdgeToNewCaller
not properly guarding the addition of a new edge (ironically I was
testing for that in an assertion, but failed to handle that case
specially otherwise). Now simply move the context ids over to any
existing edge.

This issue in turn led to some assumptions in cloning being violated,
resulting in a later crash.

Add a test for this case to checkNode.



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