From da20df21157f316648447b21f2ce6cf79a5ef57c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 3 Feb 2022 17:43:02 -0500 Subject: [PATCH] Revert "[OpenMP] Don't use bound architecture when checking cache on the host" This reverts commit 9138d96f8b01605b213e8c4d587853a46cca3f44. --- clang/lib/Driver/Driver.cpp | 4 +--- clang/test/Driver/openmp-offload-gpu.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 18dc656..3bfddee 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -4828,11 +4828,9 @@ InputInfoList Driver::BuildJobsForActionNoCache( // We may have already built this action as a part of the offloading // toolchain, return the cached input if so. - StringRef Arch = - (TargetDeviceOffloadKind == Action::OFK_Host) ? StringRef() : BoundArch; std::pair ActionTC = { OA->getHostDependence(), - GetTriplePlusArchString(TC, Arch, TargetDeviceOffloadKind)}; + GetTriplePlusArchString(TC, BoundArch, TargetDeviceOffloadKind)}; if (CachedResults.find(ActionTC) != CachedResults.end()) { InputInfoList Inputs = CachedResults[ActionTC]; Inputs.append(OffloadDependencesInputInfo); diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c index a9fc3e7..af7ba7c 100644 --- a/clang/test/Driver/openmp-offload-gpu.c +++ b/clang/test/Driver/openmp-offload-gpu.c @@ -358,8 +358,6 @@ // NEW_DRIVER: "[[HOST_TRIPLE:.+]]" - "clang", inputs: ["[[HOST_INPUT:.+]]"], output: "[[HOST_BC:.+]]" // NEW_DRIVER: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[DEVICE_INPUT:.+]]", "[[HOST_BC]]"], output: "[[DEVICE_ASM:.+]]" // NEW_DRIVER: "nvptx64-nvidia-cuda" - "NVPTX::Assembler", inputs: ["[[DEVICE_ASM]]"], output: "[[DEVICE_OBJ:.+]]" -// NEW_DRIVER: "[[HOST_TRIPLE:.+]]" - "clang", inputs: ["[[HOST_BC]]", "[[DEVICE_OBJ]]"], output: "[[HOST_OBJ:.+]]" -// NEW_DRIVER: "[[HOST_TRIPLE:.+]]" - "[[LINKER:.+]]", inputs: ["[[HOST_OBJ]]"], output: "openmp-offload-gpu" // RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target=nvptx64-nvida-cuda -march=sm_70 \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-new-nvptx-test.bc \ -- 2.7.4