This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Vectorizer: bug fix for component ref support
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ira Rosen <IRAR at il dot ibm dot com>
- Date: Wed, 13 Oct 2004 23:42:57 +0200
- Subject: Re: [patch] Vectorizer: bug fix for component ref support
> Any reason not to call vect_get_base_and_bit_offset always?
probably not. I just tested SPEC with this patch instead and it passed ok:
*************** vect_analyze_data_refs (loop_vec_info lo
*** 4933,4939 ****
{
case ARRAY_REF:
dr = analyze_array (stmt, TREE_OPERAND (symbl, 0),
DR_IS_READ(dr));
! STMT_VINFO_MEMTAG (stmt_info) = DR_BASE_NAME (dr);
break;
case VAR_DECL:
--- 4933,4941 ----
{
case ARRAY_REF:
dr = analyze_array (stmt, TREE_OPERAND (symbl, 0),
DR_IS_READ(dr));
! STMT_VINFO_MEMTAG (stmt_info) =
! vect_get_base_and_bit_offset (dr, DR_BASE_NAME
(dr), NULL_TREE,
! loop_vinfo, &offset,
&base_aligned_p);
break;
case VAR_DECL:
> I'll also note that vect_get_base_and_bit_offset should probably
> be rewritten using get_inner_reference.
True. Shall we prepare a separate patch for that? (for 4.0?)
ok to commit the above fix for now?
thanks,
dorit
|---------+---------------------------->
| | Richard Henderson|
| | <rth@redhat.com> |
| | |
| | 13/10/2004 17:49 |
|---------+---------------------------->
>----------------------------------------------------------------------------------------------------------------------------|
| |
| To: Ira Rosen/Haifa/IBM@IBMIL |
| cc: Dorit Naishlos/Haifa/IBM@IBMIL, gcc-patches@gcc.gnu.org |
| Subject: Re: [patch] Vectorizer: bug fix for component ref support |
>----------------------------------------------------------------------------------------------------------------------------|
On Wed, Oct 13, 2004 at 02:46:14PM +0200, Ira Rosen wrote:
> ! dr = analyze_array (stmt, TREE_OPERAND (symbl, 0),
DR_IS_READ(dr));
> ! if (TREE_CODE (DR_BASE_NAME (dr)) == COMPONENT_REF)
> ! STMT_VINFO_MEMTAG (stmt_info) =
> ! vect_get_base_and_bit_offset (dr,
DR_BASE_NAME (dr), NULL_TREE,
> !
loop_vinfo, &offset, &base_aligned_p);
Any reason not to call vect_get_base_and_bit_offset always?
Otherwise, I can see this == COMPONENT_REF test growing over time.
I'll also note that vect_get_base_and_bit_offset should probably
be rewritten using get_inner_reference. There are more cases to
handle than what you're currently doing. Mostly they show up with
Ada, so you won't have seen them yet.
r~