This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] vdefs question (to make vectorizer pass verify ssa)
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 31 Dec 2003 15:12:20 +0200
- Subject: [tree-ssa] vdefs question (to make vectorizer pass verify ssa)
Hi,
I've ported the vectorizer to the new tree-ssa-lno sub-branch; The one
problem that remains to be solved before I can check it in is the creation
of vdefs/vuses for the vector operations that I'm generating, in order to
be able to pass verify_ssa (at the moment I temporarily disabled the calls
to verify-ssa following the vectorizer pass, and the test cases passed
successfully).
The problem I have is with vectorizing a store operation, like the one
below:
a_2 = PHI <a_21(0), a_25(1)>;
# a_25 = VDEF <a_2>
a[i] = x;
The vector store that replaces it is of the form
"*(_vect_a + 16 * i) = vx"
where _vect_a is a pointer that points to the base of array a (stmt 5
below):
1 _vect_a.114_32 = &a;
2 _vect_var.115_33 = (<unnamed type>)i_1;
3 _vect_var.116_34 = _vect_var.115_33 * 16;
4 _vect_a.117_35 = _vect_var.116_34 + _vect_a.114_32;
5 *_vect_a.117_35 = _vect_var.109_31;
The scalar store is removed, and the vector store does not have a vdef, so
I fail on:
"
error: Missing definition
for SSA_NAME: a_25
in statement:
a_2 = PHI <a_21(0), a_25(1)>;
PHI argument
a_25
for PHI node
a_2 = PHI <a_21(0), a_25(1)>;
vec_test_HI.c:103: internal compiler error: verify_ssa failed.
"
As far as I understand copying the vdefs from the scalar stmt to the new
vector stmt should solve the problem (right?). What's the way to do this
with the new operands management API?
Alternatively, maybe the phi node should be removed/updated when the
defining store is removed??
(My previous scheme to add vdefs/vuses to the vector stores/loads is
obsolete after the changes to the operands management (
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00985.html); I was able to add
new vuses using the new API, but I didn't find support for adding vdefs;
trying to expose append_vdef() via an add_vdef() API similarly to
add_vuse() did not solve the problem).
please advise,
thanks,
dorit