r353893 - Revert r353880 "[HIP] Handle compile -m options and propagate into LLC"
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 12 14:51:54 PST 2019
Author: rnk
Date: Tue Feb 12 14:51:54 2019
New Revision: 353893
URL: http://llvm.org/viewvc/llvm-project?rev=353893&view=rev
Log:
Revert r353880 "[HIP] Handle compile -m options and propagate into LLC"
This was still causing test failures in the clang test suite.
Removed:
cfe/trunk/test/Driver/hip-toolchain-features.hip
Modified:
cfe/trunk/lib/Driver/ToolChains/HIP.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/HIP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/HIP.cpp?rev=353893&r1=353892&r2=353893&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/HIP.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/HIP.cpp Tue Feb 12 14:51:54 2019
@@ -159,25 +159,8 @@ const char *AMDGCN::Linker::constructLlc
llvm::StringRef OutputFilePrefix, const char *InputFileName) const {
// Construct llc command.
ArgStringList LlcArgs{InputFileName, "-mtriple=amdgcn-amd-amdhsa",
- "-filetype=obj",
- Args.MakeArgString("-mcpu=" + SubArchName)};
-
- // Extract all the -m options
- std::vector<llvm::StringRef> Features;
- handleTargetFeaturesGroup(
- Args, Features, options::OPT_m_amdgpu_Features_Group);
-
- // Add features to mattr such as code-object-v3 and xnack
- std::string MAttrString = "-mattr=";
- for(auto OneFeature : Features) {
- MAttrString.append(Args.MakeArgString(OneFeature));
- if (OneFeature != Features.back())
- MAttrString.append(",");
- }
- LlcArgs.push_back(Args.MakeArgString(MAttrString));
-
- // Add output filename
- LlcArgs.push_back("-o");
+ "-filetype=obj", "-mattr=-code-object-v3",
+ Args.MakeArgString("-mcpu=" + SubArchName), "-o"};
std::string LlcOutputFileName =
C.getDriver().GetTemporaryPath(OutputFilePrefix, "o");
const char *LlcOutputFile =
Removed: cfe/trunk/test/Driver/hip-toolchain-features.hip
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hip-toolchain-features.hip?rev=353892&view=auto
==============================================================================
--- cfe/trunk/test/Driver/hip-toolchain-features.hip (original)
+++ cfe/trunk/test/Driver/hip-toolchain-features.hip (removed)
@@ -1,49 +0,0 @@
-// REQUIRES: clang-driver
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
-
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mcode-object-v3 2>&1 | FileCheck %s -check-prefix=COV3
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mno-code-object-v3 2>&1 | FileCheck %s -check-prefix=NOCOV3
-
-// COV3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3"
-// NOCOV3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3"
-
-
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mxnack 2>&1 | FileCheck %s -check-prefix=XNACK
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mno-xnack 2>&1 | FileCheck %s -check-prefix=NOXNACK
-
-// XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack"
-// NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack"
-
-
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -msram-ecc 2>&1 | FileCheck %s -check-prefix=SRAM
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mno-sram-ecc 2>&1 | FileCheck %s -check-prefix=NOSRAM
-
-// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc"
-// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc"
-
-
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mcode-object-v3 -mxnack -msram-ecc \
-// RUN: 2>&1 | FileCheck %s -check-prefix=ALL3
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN: -mno-code-object-v3 -mno-xnack -mno-sram-ecc \
-// RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3
-
-// ALL3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3" "-target-feature" "+xnack" "-target-feature" "+sram-ecc"
-// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3" "-target-feature" "-xnack" "-target-feature" "-sram-ecc"
-
More information about the cfe-commits
mailing list