From 65b8b2af9b8111db669eac1d7a1b118225ce5e96 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Fri, 19 Oct 2018 15:36:45 +0000 Subject: [PATCH] [Hexagon] Remove support for V4 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344786 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ClangCommandLineReference.rst | 2 +- include/clang/Driver/Options.td | 2 -- lib/Basic/Targets/Hexagon.cpp | 15 ++++----------- test/Driver/hexagon-toolchain-elf.c | 8 -------- test/Misc/target-invalid-cpu-note.c | 2 +- 5 files changed, 6 insertions(+), 23 deletions(-) diff --git a/docs/ClangCommandLineReference.rst b/docs/ClangCommandLineReference.rst index d14dfc75cdd1..8c2a382cb9fa 100644 --- a/docs/ClangCommandLineReference.rst +++ b/docs/ClangCommandLineReference.rst @@ -2146,7 +2146,7 @@ Link stack frames through backchain on System Z .. option:: -mconsole -.. option:: -mcpu=, -mv4 (equivalent to -mcpu=hexagonv4), -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65) +.. option:: -mcpu=, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65) .. option:: -mcrc, -mno-crc diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index ca654286bd8f..e364ea54c546 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -2661,8 +2661,6 @@ def _ : Joined<["--"], "">, Flags<[Unsupported]>; // Hexagon feature flags. def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">, Group; -def mv4 : Flag<["-"], "mv4">, Group, - Alias, AliasArgs<["hexagonv4"]>; def mv5 : Flag<["-"], "mv5">, Group, Alias, AliasArgs<["hexagonv5"]>; def mv55 : Flag<["-"], "mv55">, Group, diff --git a/lib/Basic/Targets/Hexagon.cpp b/lib/Basic/Targets/Hexagon.cpp index 0ef1f6db281e..c0ce959312a6 100644 --- a/lib/Basic/Targets/Hexagon.cpp +++ b/lib/Basic/Targets/Hexagon.cpp @@ -25,14 +25,7 @@ void HexagonTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__qdsp6__", "1"); Builder.defineMacro("__hexagon__", "1"); - if (CPU == "hexagonv4") { - Builder.defineMacro("__HEXAGON_V4__"); - Builder.defineMacro("__HEXAGON_ARCH__", "4"); - if (Opts.HexagonQdsp6Compat) { - Builder.defineMacro("__QDSP6_V4__"); - Builder.defineMacro("__QDSP6_ARCH__", "4"); - } - } else if (CPU == "hexagonv5") { + if (CPU == "hexagonv5") { Builder.defineMacro("__HEXAGON_V5__"); Builder.defineMacro("__HEXAGON_ARCH__", "5"); if (Opts.HexagonQdsp6Compat) { @@ -150,9 +143,9 @@ struct CPUSuffix { }; static constexpr CPUSuffix Suffixes[] = { - {{"hexagonv4"}, {"4"}}, {{"hexagonv5"}, {"5"}}, - {{"hexagonv55"}, {"55"}}, {{"hexagonv60"}, {"60"}}, - {{"hexagonv62"}, {"62"}}, {{"hexagonv65"}, {"65"}}, + {{"hexagonv5"}, {"5"}}, {{"hexagonv55"}, {"55"}}, + {{"hexagonv60"}, {"60"}}, {{"hexagonv62"}, {"62"}}, + {{"hexagonv65"}, {"65"}}, }; const char *HexagonTargetInfo::getHexagonCPUSuffix(StringRef Name) { diff --git a/test/Driver/hexagon-toolchain-elf.c b/test/Driver/hexagon-toolchain-elf.c index 53fd90966186..96fa968ee521 100644 --- a/test/Driver/hexagon-toolchain-elf.c +++ b/test/Driver/hexagon-toolchain-elf.c @@ -57,14 +57,6 @@ // ----------------------------------------------------------------------------- // Test -mcpu= -mv // ----------------------------------------------------------------------------- -// RUN: %clang -### -target hexagon-unknown-elf \ -// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ -// RUN: -mcpu=hexagonv4 \ -// RUN: %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK020 %s -// CHECK020: "-cc1" {{.*}} "-target-cpu" "hexagonv4" -// CHECK020: {{hexagon-link|ld}}{{.*}}/Inputs/hexagon_tree/Tools/bin/../target/hexagon/lib/v4/crt0 - // RUN: %clang -### -target hexagon-unknown-elf \ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \ // RUN: -mcpu=hexagonv5 \ diff --git a/test/Misc/target-invalid-cpu-note.c b/test/Misc/target-invalid-cpu-note.c index f2b36d44b9f4..931f47a82c7e 100644 --- a/test/Misc/target-invalid-cpu-note.c +++ b/test/Misc/target-invalid-cpu-note.c @@ -100,7 +100,7 @@ // RUN: not %clang_cc1 -triple hexagon--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix HEXAGON // HEXAGON: error: unknown target CPU 'not-a-cpu' -// HEXAGON: note: valid target CPU values are: hexagonv4, hexagonv5, hexagonv55, +// HEXAGON: note: valid target CPU values are: hexagonv5, hexagonv55, // HEXAGON-SAME: hexagonv60, hexagonv62, hexagonv65 // RUN: not %clang_cc1 -triple bpf--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix BPF