This is the mail archive of the
mailing list for the GCC project.
Re: Fix problems with tree-sra.c with VIEW_CONVERT_EXPR
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dnovillo at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 28 Jun 04 15:01:49 EDT
- Subject: Re: Fix problems with tree-sra.c with VIEW_CONVERT_EXPR
> That returns NULL_TREE is it's not an SSA_VAR_P.
Huh? It does exactly what you added to is_sra_candidate_complex_ref.
The first part is the same, but then get_base_address checks that what
it has is an SSA_VAR_P a STRING_CST, a CONSTRUCTOR or an INDIRECT_REF
and returns NULL_TREE if it isn't one of those. But here we're
looking for a VAR_DECL and one that's been scalarized.
Can you show me the code you are suggesting be there instead of what
Also, the modifications that you made to scalarize_modify_expr need to
be factored with the code in scalarize_structure_assignment. There's
code duplication now:
Yes, I know. That's where I copied it from. I thought about making
a new function, but it seemed too small to be worthwhile.
This new hunk of code is exactly the same thing that
scalarize_structure_assignment does at the end. Why is it that you are
adding this here?
Because it isn't be called here.
Are you trying to handle some kind of structure nesting? Can you give
me an example?
I did, in the original patch file, but the case I saw was
<MODIFY_EXPR v1 <VIEW_CONVERT_EXPR v2>>
where both v1 and v2 had been scalarized.