[llvm] d0e60b6 - Revert "[PS4/PS5][profiling] Go back to the old way of doing a runtime hook"

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 11:41:30 PDT 2022


Author: Paul Robinson
Date: 2022-06-16T11:41:23-07:00
New Revision: d0e60b6d7ec99f32086138c831b4817cc8423ada

URL: https://github.com/llvm/llvm-project/commit/d0e60b6d7ec99f32086138c831b4817cc8423ada
DIFF: https://github.com/llvm/llvm-project/commit/d0e60b6d7ec99f32086138c831b4817cc8423ada.diff

LOG: Revert "[PS4/PS5][profiling] Go back to the old way of doing a runtime hook"

This reverts commit 39fb84343ec5cf9081e236745490c65eb8a9fc31.

Pushed without verifying the test still works.

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    llvm/test/Instrumentation/InstrProfiling/profiling.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 77e6af3a6243f..336bffdcd2a9d 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -1246,7 +1246,7 @@ bool InstrProfiling::emitRuntimeHook() {
       new GlobalVariable(*M, Int32Ty, false, GlobalValue::ExternalLinkage,
                          nullptr, getInstrProfRuntimeHookVarName());
 
-  if (TT.isOSBinFormatELF() && !TT.isPS()) {
+  if (TT.isOSBinFormatELF()) {
     // Mark the user variable as used so that it isn't stripped out.
     CompilerUsedVars.push_back(Var);
   } else {

diff  --git a/llvm/test/Instrumentation/InstrProfiling/profiling.ll b/llvm/test/Instrumentation/InstrProfiling/profiling.ll
index d65dac6a1e3da..b72a8bece714f 100644
--- a/llvm/test/Instrumentation/InstrProfiling/profiling.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/profiling.ll
@@ -2,10 +2,8 @@
 
 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes=instrprof -S | FileCheck %s --check-prefixes=MACHO
 ; RUN: opt < %s -mtriple=x86_64 -passes=instrprof -S | FileCheck %s --check-prefix=ELF_GENERIC
-; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -S | FileCheck %s --check-prefixes=ELF,ELFRT
-; RUN: opt < %s -mtriple=x86_64-unknown-fuchsia -passes=instrprof -S | FileCheck %s --check-prefixes=ELF,ELFRT
-; RUN: opt < %s -mtriple=x86_64-scei-ps4 -passes=instrprof -S | FileCheck %s --check-prefixes=ELF,PS
-; RUN: opt < %s -mtriple=x86_64-sie-ps5 -passes=instrprof -S | FileCheck %s --check-prefixes=ELF,PS
+; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -S | FileCheck %s --check-prefixes=ELF
+; RUN: opt < %s -mtriple=x86_64-unknown-fuchsia -passes=instrprof -S | FileCheck %s --check-prefixes=ELF
 ; RUN: opt < %s  -mtriple=x86_64-pc-win32-coff -passes=instrprof -S | FileCheck %s --check-prefixes=COFF
 ; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -S | FileCheck %s --check-prefixes=XCOFF
 
@@ -106,10 +104,8 @@ declare void @llvm.instrprof.increment(i8*, i64, i32, i32)
 ; MACHO:   ret i32 %[[REG]]
 ; MACHO: }
 ; COFF: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} comdat {
-; ELFRT-NOT: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
-; ELFRT-NOT:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
-; PS: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
-; PS:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
+; ELF-NOT: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
+; ELF-NOT:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
 ; XCOFF: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
 ; XCOFF:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
 ; XCOFF:   ret i32 %[[REG]]


        


More information about the llvm-commits mailing list