[patch] Cleanup and improvement of if-conversion for vectorization
Sebastian Pop
sebpop@gmail.com
Wed May 26 23:47:00 GMT 2010
On Wed, May 26, 2010 at 04:19, Richard Guenther <rguenther@suse.de> wrote:
> I still do not at all understand #3 and #4. Please explain.
0002-Predicate-all-the-memory-writes.patch
0003-Fix-creation-of-temp-variables.patch
Before #2 the only variables that were created by the if-conversion
pass were scalar SSA names. #2 allows reads and writes to memory.
Patch #3 allows the creation of non SSA names, as these are needed in
assignments from non scalar code: in ifc-4.c (from patch #4) we would
have this kind of errors without #3:
error: virtual SSA name for non-VOP decl while verifying SSA_NAME
_ifc_.11_24 in statement
See 1832_3.diff for the differences on if-converted code of ifc-4.c
with and without #3.
For 0004-Handle-COND_EXPRs-in-alias-analysis.patch, on ifc-4.c, we end
up calling refs_may_alias_p with a COND_EXPR:
(gdb) p ref1
$60 = (tree) 0x7ffff5709840
(gdb) pgs
D.2757_29 != 0 ? _ifc_.11 : _ifc_.12;
and then refs_may_alias_p_1 fails. To avoid COND_EXPRs to be
considered as memory references, we have to handle assignments with
COND_EXPRs. #4 changes ref_maybe_used_by_stmt_p to handle COND_EXPRs
as assignments: REF may be used in operand 1 or 2 of the COND_EXPR.
Sebastian
More information about the Gcc-patches
mailing list