[llvm] r318807 - [Hexagon] Add HexagonSubtarget::getVectorLength()
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 14:13:17 PST 2017
Author: kparzysz
Date: Tue Nov 21 14:13:16 2017
New Revision: 318807
URL: http://llvm.org/viewvc/llvm-project?rev=318807&view=rev
Log:
[Hexagon] Add HexagonSubtarget::getVectorLength()
Modified:
llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h
Modified: llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h?rev=318807&r1=318806&r2=318807&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h Tue Nov 21 14:13:16 2017
@@ -181,6 +181,15 @@ public:
/// dependency.
void adjustSchedDependency(SUnit *def, SUnit *use, SDep& dep) const override;
+ unsigned getVectorLength() const {
+ assert(useHVXOps());
+ if (useHVX64BOps())
+ return 64;
+ if (useHVX128BOps())
+ return 128;
+ llvm_unreachable("Invalid HVX vector length settings");
+ }
+
unsigned getL1CacheLineSize() const;
unsigned getL1PrefetchDistance() const;
More information about the llvm-commits
mailing list