Below is a sample program that shows the effect of using
-LNO:loop_model_simd=on. With this flag, simd checks whether moving an
outerloop to innermost position will enable more vectorization and provides
this information to loop interchange which does the actual interchange.
In the example below, the middle loop is moved to the innermost position
enabling generation of more vectorized operations.
$cat testcase.f
SUBROUTINE SAMPLE(A,X,Y,Z,N1,N2,N3)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
DIMENSION X(100,N1),Y(100,N1),Z(100),A(100)
I3 = 0
DO 30 I2 = 1,N3
DO 20 I1= 1,N2
I3 = I3 + 1
Z(I3) = (7.0*(A(I2) - A(I1)))
B = Z(I3)
DO 10 I = 1,N1
Y(I3,I) = B * X(I3,I)
10 CONTINUE
20 CONTINUE
30 CONTINUE
END
Sample compilations:
$ openf90 testcase.f -O3 -LNO:simd_verbose=on
(testcase.f:7) Vectorization is not likely to be beneficial (try -LNO:simd=2 to
vectorize it). Loop was not vectorized.
(testcase.f:11) Non-contiguous array "X" reference exists. Loop was not
vectorized.
(testcase.f:11) Non-contiguous array "X" reference exists. Loop was not
vectorized.
$ openf90 testcase.f -O3 -LNO:simd_verbose=on -LNO:simd=2
(testcase.f:7) LOOP WAS VECTORIZED.
(testcase.f:11) Non-contiguous array "X" reference exists. Loop was not
vectorized.
(testcase.f:11) Non-contiguous array "X" reference exists. Loop was not
vectorized.
$ openf90 testcase.f -O3 -LNO:simd_verbose=on -LNO:loop_model_simd=on
Vectorizable outer loop at line:7 is moved to innermost position
(testcase.f:7) LOOP WAS VECTORIZED.
(testcase.f:7) LOOP WAS VECTORIZED.
(testcase.f:7) LOOP WAS VECTORIZED.
Unfortunately, don't have any details on "//bug 2456, bug 5724 and bug 9143"
(an already-existing comment in the code base).
-Pallavi
-----Original Message-----
From: Christopher Bergström [mailto:[email protected]]
Sent: Thursday, June 02, 2011 3:28 PM
To: Mathew, Pallavi
Cc: [email protected]
Subject: Re: [Open64-devel] Code review request for vectorizer patch
On Fri, Jun 3, 2011 at 6:15 AM, Mathew, Pallavi <[email protected]> wrote:
> Hi,
>
> Can a gatekeeper please review the attached vectorizer patch that
>
> moves the vectorizable loop to the innermost position. This optimization
>
> is disabled by default and can be enabled via -LNO:loop_model_simd=on.
Can you please provide a test case and if possible more details on
//bug 2456, bug 5724 and bug 9143.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel