r329077 - [Hexagon] Remove -mhvx-double and the corresponding subtarget feature
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 08:59:10 PDT 2018
Author: kparzysz
Date: Tue Apr 3 08:59:10 2018
New Revision: 329077
URL: http://llvm.org/viewvc/llvm-project?rev=329077&view=rev
Log:
[Hexagon] Remove -mhvx-double and the corresponding subtarget feature
Specifying the HVX vector length should be done via the -mhvx-length
option.
Modified:
cfe/trunk/docs/ClangCommandLineReference.rst
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Basic/Targets/Hexagon.cpp
cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
cfe/trunk/test/Driver/hexagon-hvx.c
Modified: cfe/trunk/docs/ClangCommandLineReference.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ClangCommandLineReference.rst?rev=329077&r1=329076&r2=329077&view=diff
==============================================================================
--- cfe/trunk/docs/ClangCommandLineReference.rst (original)
+++ cfe/trunk/docs/ClangCommandLineReference.rst Tue Apr 3 08:59:10 2018
@@ -2294,10 +2294,6 @@ Hexagon
Enable Hexagon Vector eXtensions
-.. option:: -mhvx-double, -mno-hvx-double
-
-Enable Hexagon Double Vector eXtensions
-
.. option:: -mhvx-length=<arg>
Set Hexagon Vector Length
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=329077&r1=329076&r2=329077&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Apr 3 08:59:10 2018
@@ -2504,13 +2504,6 @@ def mpackets : Flag<["-"], "mpackets">,
Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
-// hvx-double deprecrated flag.
-def mhexagon_hvx_double : Flag<[ "-" ], "mhvx-double">,
- Group<m_hexagon_Features_HVX_Group>,
- HelpText<"Enable Hexagon Double Vector eXtensions">;
-def mno_hexagon_hvx_double : Flag<[ "-" ], "mno-hvx-double">,
- Group<m_hexagon_Features_HVX_Group>,
- HelpText<"Disable Hexagon Double Vector eXtensions">;
// X86 feature flags
Modified: cfe/trunk/lib/Basic/Targets/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/Hexagon.cpp?rev=329077&r1=329076&r2=329077&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/Hexagon.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/Hexagon.cpp Tue Apr 3 08:59:10 2018
@@ -75,7 +75,6 @@ void HexagonTargetInfo::getTargetDefines
bool HexagonTargetInfo::initFeatureMap(
llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
const std::vector<std::string> &FeaturesVec) const {
- Features["hvx-double"] = false;
Features["long-calls"] = false;
return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp?rev=329077&r1=329076&r2=329077&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Tue Apr 3 08:59:10 2018
@@ -37,12 +37,6 @@ static StringRef getDefaultHvxLength(Str
}
static void handleHVXWarnings(const Driver &D, const ArgList &Args) {
- // Handle deprecated HVX double warnings.
- if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_double))
- D.Diag(diag::warn_drv_deprecated_arg)
- << A->getAsString(Args) << "-mhvx-length=128B";
- if (Arg *A = Args.getLastArg(options::OPT_mno_hexagon_hvx_double))
- D.Diag(diag::warn_drv_deprecated_arg) << A->getAsString(Args) << "-mno-hvx";
// Handle the unsupported values passed to mhvx-length.
if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {
StringRef Val = A->getValue();
@@ -63,14 +57,13 @@ static void handleHVXTargetFeatures(cons
StringRef HVXFeature, HVXLength;
StringRef Cpu(toolchains::HexagonToolChain::GetTargetCPUVersion(Args));
- // Handle -mhvx, -mhvx=, -mno-hvx, -mno-hvx-double.
- if (Arg *A = Args.getLastArg(
- options::OPT_mno_hexagon_hvx, options::OPT_mno_hexagon_hvx_double,
- options::OPT_mhexagon_hvx, options::OPT_mhexagon_hvx_EQ)) {
- if (A->getOption().matches(options::OPT_mno_hexagon_hvx) ||
- A->getOption().matches(options::OPT_mno_hexagon_hvx_double)) {
+ // Handle -mhvx, -mhvx=, -mno-hvx.
+ if (Arg *A = Args.getLastArg(options::OPT_mno_hexagon_hvx,
+ options::OPT_mhexagon_hvx,
+ options::OPT_mhexagon_hvx_EQ)) {
+ if (A->getOption().matches(options::OPT_mno_hexagon_hvx))
return;
- } else if (A->getOption().matches(options::OPT_mhexagon_hvx_EQ)) {
+ if (A->getOption().matches(options::OPT_mhexagon_hvx_EQ)) {
HasHVX = true;
HVXFeature = Cpu = A->getValue();
HVXFeature = Args.MakeArgString(llvm::Twine("+hvx") + HVXFeature.lower());
@@ -81,16 +74,13 @@ static void handleHVXTargetFeatures(cons
Features.push_back(HVXFeature);
}
- // Handle -mhvx-length=, -mhvx-double.
- if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ,
- options::OPT_mhexagon_hvx_double)) {
+ // Handle -mhvx-length=.
+ if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {
// These falgs are valid only if HVX in enabled.
if (!HasHVX)
D.Diag(diag::err_drv_invalid_hvx_length);
else if (A->getOption().matches(options::OPT_mhexagon_hvx_length_EQ))
HVXLength = A->getValue();
- else if (A->getOption().matches(options::OPT_mhexagon_hvx_double))
- HVXLength = "128b";
}
// Default hvx-length based on Cpu.
else if (HasHVX)
Modified: cfe/trunk/test/Driver/hexagon-hvx.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-hvx.c?rev=329077&r1=329076&r2=329077&view=diff
==============================================================================
--- cfe/trunk/test/Driver/hexagon-hvx.c (original)
+++ cfe/trunk/test/Driver/hexagon-hvx.c Tue Apr 3 08:59:10 2018
@@ -11,12 +11,6 @@
// CHECKHVX162: "-target-feature" "+hvxv62"
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv65 -mhvx \
-// RUN: -mhvx-double 2>&1 | FileCheck -check-prefix=CHECKHVX2 %s
-
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx \
-// RUN: -mhvx-double 2>&1 | FileCheck -check-prefix=CHECKHVX2 %s
-
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv65 -mhvx \
// RUN: -mhvx-length=128B 2>&1 | FileCheck -check-prefix=CHECKHVX2 %s
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx \
@@ -34,23 +28,11 @@
// RUN: | FileCheck -check-prefix=CHECKHVX3 %s
// CHECKHVX3-NOT: "-target-feature" "+hvx
-// -mhvx-double is deprecated.
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx-double \
-// RUN: 2>&1 | FileCheck -check-prefix=CHECK-DEPRECATED %s
-// CHECK-DEPRECATED: warning: argument '-mhvx-double' is deprecated, use '-mhvx-length=128B' instead [-Wdeprecated]
-
-// -mno-hvx-double is deprecated.
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mno-hvx-double \
-// RUN: 2>&1 | FileCheck -check-prefix=CHECK-NODEPRECATED %s
-// CHECK-NODEPRECATED: warning: argument '-mno-hvx-double' is deprecated, use '-mno-hvx' instead [-Wdeprecated]
-
-// No hvx target feature must be added if -mno-hvx/-mno-hvx-double occurs last
+// No hvx target feature must be added if -mno-hvx occurs last
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mno-hvx \
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-NOHVX %s
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx -mno-hvx \
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-NOHVX %s
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx -mno-hvx-double \
-// RUN: 2>&1 | FileCheck -check-prefix=CHECK-NOHVX %s
// CHECK-NOHVX-NOT: "-target-feature" "+hvx
// Hvx target feature should be added if -mno-hvx doesnot occur last
@@ -96,8 +78,6 @@
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-ERROR %s
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mhvx-length=128B \
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-ERROR %s
-// RUN: %clang -c %s -### -target hexagon-unknown-elf -mhvx-double \
-// RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-ERROR %s
// CHECK-HVXLENGTH-ERROR: error: -mhvx-length is not supported without a -mhvx/-mhvx= flag
// Error out if an unsupported value is passed to -mhvx-length.
More information about the cfe-commits
mailing list