Skip to content

Commit fef0ebb

Browse files
committed
Revert "[HIP] Add option --gpu-instrument-lib="
This reverts commit 64f7790 due to regression in hip-device-libs.hip.
1 parent 64f7790 commit fef0ebb

File tree

4 files changed

+0
-24
lines changed

4 files changed

+0
-24
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,6 @@ defm gpu_allow_device_init : OptInFFlag<"gpu-allow-device-init",
672672
def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
673673
Flags<[CC1Option]>,
674674
HelpText<"Default max threads per block for kernel launch bounds for HIP">;
675-
def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">,
676-
HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing "
677-
"__cyg_profile_func_enter and __cyg_profile_func_exit">;
678675
def libomptarget_nvptx_path_EQ : Joined<["--"], "libomptarget-nvptx-path=">, Group<i_Group>,
679676
HelpText<"Path to libomptarget-nvptx libraries">;
680677
def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>,

clang/lib/Driver/ToolChains/HIP.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -330,17 +330,6 @@ void HIPToolChain::addClangTargetOptions(
330330
RocmInstallation.addCommonBitcodeLibCC1Args(
331331
DriverArgs, CC1Args, LibDeviceFile, Wave64, DAZ, FiniteOnly,
332332
UnsafeMathOpt, FastRelaxedMath, CorrectSqrt);
333-
334-
// Add instrument lib.
335-
auto InstLib =
336-
DriverArgs.getLastArgValue(options::OPT_gpu_instrument_lib_EQ);
337-
if (InstLib.empty())
338-
return;
339-
if (llvm::sys::fs::exists(InstLib)) {
340-
CC1Args.push_back("-mlink-builtin-bitcode");
341-
CC1Args.push_back(DriverArgs.MakeArgString(InstLib));
342-
} else
343-
getDriver().Diag(diag::err_drv_no_such_file) << InstLib;
344333
}
345334
}
346335

clang/test/Driver/Inputs/hip_multiple_inputs/instrument.bc

Whitespace-only changes.

clang/test/Driver/hip-device-libs.hip

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,6 @@
105105
// RUN: %S/Inputs/hip_multiple_inputs/b.hip \
106106
// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL
107107

108-
// Test --gpu-instrument-lib
109-
// RUN: %clang -### -target x86_64-linux-gnu \
110-
// RUN: --cuda-gpu-arch=gfx900 \
111-
// RUN: --rocm-path=%S/Inputs/rocm \
112-
// RUN: --gpu-instrument-lib=%S/Inputs/hip_multiple_inputs/instrument.bc \
113-
// RUN: %S/Inputs/hip_multiple_inputs/b.hip \
114-
// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,INST
115-
116-
// ALL-NOT: error:
117108
// ALL: {{"[^"]*clang[^"]*"}}
118109
// ALL-SAME: "-mlink-builtin-bitcode" "{{.*}}hip.bc"
119110
// ALL-SAME: "-mlink-builtin-bitcode" "{{.*}}ocml.bc"
@@ -127,4 +118,3 @@
127118
// ALL-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_on.bc"
128119
// ALL-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_on.bc"
129120
// ALL-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_isa_version_{{[0-9]+}}.bc"
130-
// INST-SAME: "-mlink-builtin-bitcode" "{{.*}}instrument.bc"

0 commit comments

Comments
 (0)