[llvm] Make functions always renamable (PR #115226)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 19:22:57 PST 2024


================
@@ -175,6 +175,9 @@ static CalleeInfo::HotnessType getHotness(uint64_t ProfileCount,
 }
 
 static bool isNonRenamableLocal(const GlobalValue &GV) {
+  if (isa<Function>(&GV)) {
----------------
teresajohnson wrote:

This is a proposal, to revert to the behavior before a recent change that changed how sections were carried in the IR for C++ functions (specifically, they used to be carried via attribute and not until later marked in the GV). Would you be able to look at the RFC, and specifically, the original patch that introduced this concept of not renaming locals with sections? It was added during the original ThinLTO development for MachO, and I'm wondering if you can help fill in the gaps on when this is needed for MachO. From a separate discussion with @MaskRay it seemed like this restriction might not be needed for ELF.

https://github.com/llvm/llvm-project/pull/115226


More information about the llvm-commits mailing list