For the LNO part:
- The code appears hard-wired to handle single-nested and double-nested
cases and not flexible enough to extend it for triple-nested cases.
(I do not require a change for this patch, a fix in the future will be good).
- Does the code take care of the following case where the comparison is a
"OPR_NE" with a zero, but the if-condition expression is not a single load?
if ((x & mask1) != 0) {
if (y & mask2) != 0) {
}
}
- L287: "LWN_Get_Parent(WN_do_body(loop))" can be CSEed.
- L286 and L420: identifying 2-operand operators can be CSEed.
-Mei
-----Original Message-----
From: Mathew, Pallavi [mailto:[email protected]]
Sent: Tuesday, June 14, 2011 3:47 PM
To: Sun Chan
Cc: [email protected]
Subject: Re: [Open64-devel] Code review request for vectorizer patch [LNO] [CG]
The original patch has been split into the two attached patches.
whirl.p: proposed WHIRL changes to add OPR_BLEND.
vectorizer.p: vectorization of if-statements that uses OPR_BLEND.
-Pallavi
-----Original Message-----
From: Sun Chan [mailto:[email protected]]
Sent: Tuesday, June 14, 2011 2:51 PM
To: Mathew, Pallavi
Cc: [email protected]
Subject: Re: [Open64-devel] Code review request for vectorizer patch [LNO] [CG]
This is a WHIRL change, Fred, can you look at the change (at least the new
OPR_BLEND) to see if that is ok?
Sun
On Tue, Jun 14, 2011 at 1:39 PM, Mathew, Pallavi <[email protected]> wrote:
> Hi,
>
> Can a gatekeeper please review the attached patch which introduces a
> framework for vectorization of IF-statements of the form:
>
> - if (x != 0) { single_istore_statement } else {empty_body}
>
> - if (x != 0) { if (y !=0) {single_istore_statement} else
> {empty_body}} else {empty_body}
>
>
>
> Sample program:
>
> long array[2000000];
>
> void sample() {
>
> long i;
>
> for(i = 0; i < 2000000; i++) {
>
> if (array[i])
>
> array[i] ^= i;
>
> }
>
> return;
>
> }
>
>
>
> Vectorization of such if-statement is done by first vectorizing its
> subexpressions.
>
> The result of the vectorized if-condition is computed by 'pcmpeqq'
> (V16I8EQ) and
>
> is used to select between the result of executing the statement in the
> if-body or
>
> leaving the array element unchanged. This selection is performed by
> the
>
> 'pblendvb' (V16I1V16I1BLEND) operation. Both of these are SSE4.1
> instructions.
>
> We introduce a new whirl operation OPR_BLEND which eventually gets
> translated to 'pblendvb'.
>
> This optimization is turned on by default and can be controlled by
> -LNO:simd_vect_if={on/off}.
>
> This patch also recognizes and handles vectorization of invariants
> rooted at OPR_ADD, OPR_SUB and OPR_MPY.
>
>
>
> Files updated by this patch:
>
> osprey/be/lno/simd.cxx
>
> - vectorization of if-statements.
>
> - vectorization of invariants rooted at OPR_ADD, OPR_SUB and OPR_MPY.
>
> osprey/common/com/config_lno.h
>
> osprey/common/com/config_lno.cxx
>
> - add flag to control vectorization of if-statements
>
> osprey/common/com/opcode_gen_core.h
>
> - add the OPR_BLEND operation and its opcode.
>
> - add opcode for vectorized version of OPR_EQ.
>
> osprey/common/com/opcode_gen_core.cxx
>
> - specify number of kids, desc, rtype, property(expression), etc. for
> OPR_BLEND.
>
> osprey/common/com/wn.cxx
>
> - enable WN_has_side_effects for opr_blend
>
> osprey/be/opt/opt_bdce.cxx
>
> - propagate live bits down the expression tree.
>
> osprey/be/cg/whirl2ops.cxx
>
> - expand expression containing OPR_BLEND
>
> - add handler for blend.
>
> osprey/be/cg/cgexp_internals.h
>
> - add declaration of Expand_Blend
>
> osprey/be/cg/x8664/expand.cxx
>
> - expand OPC_BLEND to expression containing TNs
>
> osprey/be/com/x8664/betarget.cxx
>
> - convert opcode to TOP... (return top_blend...)
>
> osprey/common/com/wn_util.h
>
> osprey/common/com/wn_util.cxx
>
> - add utility routine.
>
>
>
> Thanks.
>
> Pallavi
>
> ----------------------------------------------------------------------
> -------- 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
>
>
------------------------------------------------------------------------------
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