diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-03-09 17:05:11 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-03-09 17:05:11 +0000 |
| commit | 7a0981aa38b195e877726c9fdfea3fbf689dab4a (patch) | |
| tree | 6086edc47bfc20e08cf2e52f6aa32686c2c4b1e0 /llvm/lib | |
| parent | 0490e1c5f4443e0caa59cdd164636c22a35d2120 (diff) | |
| download | bcm5719-llvm-7a0981aa38b195e877726c9fdfea3fbf689dab4a.tar.gz bcm5719-llvm-7a0981aa38b195e877726c9fdfea3fbf689dab4a.zip | |
[Hexagon] Add -mhvx option to the Hexagon backend
llvm-svn: 297393
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp index 22d99bfb371..bb98c2bbef6 100644 --- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp +++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp @@ -70,6 +70,9 @@ static cl::opt<bool> HexagonV60ArchVariant("mv60", cl::Hidden, cl::init(false), 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 checkFeature(MCSubtargetInfo* STI, uint64_t F) 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; } |

