[llvm] r269027 - Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to overwrite the same symbol in profile run-time to distinguish IR profiles from Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the lack of COMDAT support."

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 01:23:58 PDT 2016


Author: rengolin
Date: Tue May 10 03:23:57 2016
New Revision: 269027

URL: http://llvm.org/viewvc/llvm-project?rev=269027&view=rev
Log:
Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to overwrite the same symbol in profile run-time to distinguish IR profiles from Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the lack of COMDAT support."

This reverts commits r268969, r268979 and r268984. They had target specific test
in generic directories without the correct specifiers and made it hard for us to
come up with a good solution by rapidly committing untested changes.

This test needs to be in a target specific directory or have the correct REQUIRED
identifier.

Removed:
    llvm/trunk/test/Transforms/PGOProfile/macho.ll
Modified:
    llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=269027&r1=269026&r2=269027&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Tue May 10 03:23:57 2016
@@ -775,7 +775,7 @@ static void createIRLevelProfileFlagVari
   IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility);
   Triple TT(M.getTargetTriple());
   if (TT.isOSBinFormatMachO())
-    IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceAnyLinkage);
+    IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceODRLinkage);
   else
     IRLevelVersionVariable->setComdat(M.getOrInsertComdat(
         StringRef(INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR))));

Removed: llvm/trunk/test/Transforms/PGOProfile/macho.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PGOProfile/macho.ll?rev=269026&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/PGOProfile/macho.ll (original)
+++ llvm/trunk/test/Transforms/PGOProfile/macho.ll (removed)
@@ -1,10 +0,0 @@
-; RUN: opt < %s -pgo-instr-gen -instrprof -S | llc | FileCheck %s --check-prefix=MACHO-DIRECTIVE
-
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.11.0"
-
-; MACHO-DIRECTIVE: .weak_definition        ___llvm_profile_raw_version
-define i32 @test_macho(i32 %i) {
-entry:
-  ret i32 %i
-}




More information about the llvm-commits mailing list