changeset 9757:e865310767be

Method for determining supported vector lengths.
author Roland Schatz <roland.schatz@oracle.com>
date Fri, 17 May 2013 13:55:24 +0200
parents d51f6d7fa6c4
children 43a94291d239
files graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java	Fri May 17 15:04:09 2013 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java	Fri May 17 13:55:24 2013 +0200
@@ -161,8 +161,25 @@
     /**
      * Determine the maximum vector length supported for vector operations on values of a given
      * {@link Kind}.
+     * 
+     * @param kind the kind of the individual vector elements
+     * @return the maximum supported vector size
      */
-    public int getMaxVectorLength(@SuppressWarnings("unused") Kind kind) {
+    public int getMaxVectorLength(Kind kind) {
+        return 1;
+    }
+
+    /**
+     * Get a natively supported vector length for breaking down some vector operation on a constant
+     * length vector.
+     * 
+     * @param kind the kind of the individual vector elements
+     * @param maxLength the maximum length that should be returned
+     * @param arithmetic whether the vector length needs to support arithmetic operations or just
+     *            load and store
+     * @return a supported vector size, but at most {@code maxLength}
+     */
+    public int getSupportedVectorLength(Kind kind, int maxLength, boolean arithmetic) {
         return 1;
     }