This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Auto-vectorization with gcj


Hello,

I tried to test auto-vectorization with the following java program:

public class Test {
  private static int[] a = new int[256];
  private static int[] b = new int[256];
  private static int[] c = new int[256];

  public static final void main(String[] args) {
    for (int i = 0; i < 256; i++) {
      b[i] = i;
      c[i] = i;
    }
    for (int i = 0; i < 256; i++) {
      a[i] = b[i] + c[i];
    }
  }
}

When I compile it with

gcj -msse2 -O2 -ftree-vectorize -ftree-vectorizer-verbose=5 -c Test.java

I get the following message:

Test.java:9: note: not vectorized: multiple exits.
Test.java:14: note: not vectorized: multiple exits.
Test.java:7: note: vectorized 0 loops in function.

Is it not possible to use auto-vectorization with gcj until now?

gcj -v prints:
>>>
Using built-in specs.
Reading specs from /usr/lib/gcc/i386-redhat-linux/4.0.0/libgcj.spec
rename spec lib to liborig
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050505 (Red Hat 4.0.0-4)
<<<

Please send a cc to me if you send a reply. Thanks.

Dietmar

-- 
Dietmar Lippold, Institut IS, Universität Stuttgart
Raum 1.461, Universitätsstraße 38,  70569 Stuttgart
Tel.: 0711 / 7816 - 435;     Fax: 0711 / 7816 - 340
E-Mail: dietmar.lippold@informatik.uni-stuttgart.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]