Enable Hexagon Vector eXtensions
-.. option:: -mhvx-double, -mno-hvx-double
-
-Enable Hexagon Double Vector eXtensions
-
.. option:: -mhvx-length=<arg>
Set Hexagon Vector Length
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
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);
}
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();
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());
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)
// RUN: 2>&1 | FileCheck -check-prefix=CHECKHVX162 %s
// 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: | 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
// 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.