[all-commits] [llvm/llvm-project] 3fe50b: [BOLT] Store FileSymRefs in a multimap

Amir Ayupov via All-commits all-commits at lists.llvm.org
Tue Jul 16 22:15:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fe50b6dde174c76b3380927d7dd43ac19527d64
      https://github.com/llvm/llvm-project/commit/3fe50b6dde174c76b3380927d7dd43ac19527d64
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2024-07-16 (Tue, 16 Jul 2024)

  Changed paths:
    M bolt/include/bolt/Rewrite/RewriteInstance.h
    M bolt/lib/Rewrite/RewriteInstance.cpp
    A bolt/test/X86/Inputs/ambiguous_fragment.s
    A bolt/test/X86/Inputs/ambiguous_fragment.script
    A bolt/test/X86/ambiguous_fragment.test

  Log Message:
  -----------
  [BOLT] Store FileSymRefs in a multimap

With aggressive ICF, it's possible to have different local symbols
(under different FILE symbols) to be mapped to the same address.

FileSymRefs only keeps a single SymbolRef per address, which prevents
fragment matching from finding the correct symbol to perform parent
function lookup.

Work around this issue by switching FileSymRefs to a multimap. In
future, uses of FileSymRefs can be replaced with SortedSymbols which
keeps essentially the same information.

Test Plan: added ambiguous_fragment.test

Reviewers: dcci, ayermolo, maksfb, rafaelauler

Reviewed By: rafaelauler

Pull Request: https://github.com/llvm/llvm-project/pull/98992



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