Fix problems with tree-sra.c with VIEW_CONVERT_EXPR

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Jun 28 20:32:00 GMT 2004


    > 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
I wrote?

    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.



More information about the Gcc-patches mailing list