[all-commits] [llvm/llvm-project] c13b04: [Propeller] Match debug info filenames from profil...
Rahman Lavaee via All-commits
all-commits at lists.llvm.org
Tue Jun 27 14:28:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c13b046de338d2751283b1abbe9dd61e96ac05c8
https://github.com/llvm/llvm-project/commit/c13b046de338d2751283b1abbe9dd61e96ac05c8
Author: Rahman Lavaee <rahmanl at google.com>
Date: 2023-06-27 (Tue, 27 Jun 2023)
Changed paths:
M llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
M llvm/lib/CodeGen/BasicBlockSections.cpp
M llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
M llvm/test/CodeGen/X86/basic-block-sections-clusters-error.ll
A llvm/test/CodeGen/X86/basic-block-sections-module1.ll
A llvm/test/CodeGen/X86/basic-block-sections-module2.ll
Log Message:
-----------
[Propeller] Match debug info filenames from profiles to distinguish internal linkage functions with the same names.
Basic block sections profiles are ingested based on the function name. However, conflicts may occur when internal linkage functions with the same symbol name are linked into the binary (for instance static functions defined in different modules). Currently, these functions cannot be optimized unless we use `-funique-internal-linkage-names` (D89617) to enforce unique symbol names.
However, we have found that `-funique-internal-linkage-names` does not play well with inline assembly code which refers to the symbol via its symbol name. For example, the Linux kernel does not build with this option.
This patch implements a new feature which allows differentiating profiles based on the debug info filenames associated with each function. When specified, the given path is compared against the debug info filename of the matching function and profile is ingested only when the debug info filenames match. Backward-compatibility is guaranteed as omitting the specifiers from the profile would allow them to be matched by function name only. Also specifiers can be included for a subset of functions only.
Reviewed By: shenhan
Differential Revision: https://reviews.llvm.org/D146770
More information about the All-commits
mailing list