[llvm] r297393 - [Hexagon] Add -mhvx option to the Hexagon backend
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 09:05:12 PST 2017
Author: kparzysz
Date: Thu Mar 9 11:05:11 2017
New Revision: 297393
URL: http://llvm.org/viewvc/llvm-project?rev=297393&view=rev
Log:
[Hexagon] Add -mhvx option to the Hexagon backend
Modified:
llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp?rev=297393&r1=297392&r2=297393&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp Thu Mar 9 11:05:11 2017
@@ -70,6 +70,9 @@ static cl::opt<bool> HexagonV60ArchVaria
static cl::opt<bool> HexagonV62ArchVariant("mv62", cl::Hidden, cl::init(false),
cl::desc("Build for Hexagon V62"));
+static cl::opt<bool> EnableHVX("mhvx", cl::Hidden, cl::init(false),
+ cl::desc("Enable Hexagon Vector Extension (HVX)"));
+
static StringRef DefaultArch = "hexagonv60";
static StringRef HexagonGetArchVariant() {
@@ -249,8 +252,11 @@ static bool LLVM_ATTRIBUTE_UNUSED checkF
StringRef Hexagon_MC::ParseHexagonTriple(const Triple &TT, StringRef CPU) {
StringRef CPUName = Hexagon_MC::selectHexagonCPU(TT, CPU);
StringRef FS = "";
- if (CPUName.equals_lower("hexagonv60") || CPUName.equals_lower("hexagonv62"))
- FS = "+hvx";
+ if (EnableHVX) {
+ if (CPUName.equals_lower("hexagonv60") ||
+ CPUName.equals_lower("hexagonv62"))
+ FS = "+hvx";
+ }
return FS;
}
More information about the llvm-commits
mailing list