Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • New: struct copying code gen

    7 answers - 651 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Take the following code:
    struct s
    {
    short t;
    short y1;
    };
    void f(struct s *x, struct s *y)
    {
    struct s t = *x;
    *y = t;
    }
    In 3.4.0, we produced:
    _f:
    lwz r0,0(r3)
    stw r0,0(r4)
    blr
    but in 4.0.0 and above:
    _f:
    lhz r2,2(r3)
    lha r0,0(r3)
    sth r2,2(r4)
    sth r0,0(r4)
    blr
    I am starting to think we should use VIEW_CNVERT_EXPR in SRA and store it into a type which is the
    same as the mode if the mode is not BKL_MDE (RTL mode by the way) and we don't access the
    temporary variable's fields. That would fix PR 22156 also. Maybe I can look into doing this.
  • No.1 | | 79 bytes | |

    --
    What |Removed |Added
    Target Milestone| |4.0.2
  • No.2 | | 118 bytes | |

    Additional Comments From pinskia at gcc dot gnu dot org 2005-06-23 19:49
    I have a fix, it does what I recommended.
  • No.3 | | 198 bytes | |

    Additional Comments From pinskia at gcc dot gnu dot org 2005-07-04 10:26
    I am no longer working on this, this is a much harder problem than I sugested. This is basically the
    same as PR 18268.
  • No.4 | | 226 bytes | |

    --
    Bug 22157 depends on bug 18268, which changed state.
    Bug 18268 Summary: structure copy propagation not done
    What | Value |New Value
    Status|NEW |RESLVED
    Resolution| |DUPLICATE
  • No.5 | | 271 bytes | |

    Additional Comments From rguenth at gcc dot gnu dot org 2005-09-15 09:46
    Can you elaborate on why the VIEW_CNVERT_EXPR experiment failed and perhaps
    attach the patch you tried? does using VIEW_CNVERT_EXPR just expose that
    we don't do structure propagation?
  • No.6 | | 437 bytes | |

    Additional Comments From pinskia at gcc dot gnu dot org 2005-09-15 13:59
    (In reply to comment #3)
    Can you elaborate on why the VIEW_CNVERT_EXPR experiment failed and perhaps
    attach the patch you tried? does using VIEW_CNVERT_EXPR just expose that
    we don't do structure propagation?

    VCE failed because it causes some missed optimizations and really just exposed the fact we don't have
    structure copy prop.
  • No.7 | | 250 bytes | |

    Additional Comments From pinskia at gcc dot gnu dot org 2005-09-15 14:27
    I am just going to mark this one as a dup of bug 22156, because it is the same problem, just different
    testcases.
    This bug has been marked as a duplicate of 22156

Re: New: struct copying code gen


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "Development"

EMSDN.COM