This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/20284] CCP still doesn't look inside initializers for structures


------- Additional Comments From dnovillo at gcc dot gnu dot org  2005-03-02 15:28 -------

Pasting IRC dialogue to avoid forgetting what this was all about:

<stevenb> dnovillo: i had a patch to make CCP look in initializers for
structures, but rth and you rejected it, claiming it should not be done in CCP
but in fold.
<dnovillo> stevenb: rth rejected it, actually.
<stevenb> oh whatever. someone did.
<dnovillo> stevenb: i remember it having some issues, but don't remember what
those were.
<stevenb> dnovillo: rth said it should not be in ccp, and be more general
<dnovillo> stevenb: in fold?  that sounds more like a job for get_default_value.
<stevenb> dnovillo: i just took code from expr.c but apparently just replacing
that was not good enough
<DannyB> It is a job
<dnovillo> anyway, what became of that?
<DannyB> for get_default_value
<stevenb> dnovillo: dropped on the floor until 4.1
<stevenb> dnovillo: and now not interesting anymore
<stevenb> dnovillo: the primary motivation was IS_EXPR_CODE_CLASS
<dnovillo> stevenb: ok.  do you have your latest draft?
<stevenb> dnovillo: but that's done without strchr now
<stevenb> dnovillo: probably floating somewhere in the gcc-patches archives
<dnovillo> stevenb: any date/subject that may help me dig it out?  i'll put it
in my pile.
<vagabon> dnovillo: RP done....
<stevenb> dnovillo: there is a PR for it that is already assigned to you
<dnovillo> stevenb: you're joking.
<dnovillo> really?
<vagabon> :)
<dnovillo> sigh
<vagabon> now 2 PR
<stevenb> dnovillo: i am not a funny guy.  i never make jokes about it ;)
<dnovillo> stevenb: is this the one you're thinking about? 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14841
<gccbot> gcc bug #14841: [tree-ssa] const_array[CST] is not folded Product: gcc,
Component: tree-optimization, Severity: enhancement, Assigned to:
dnovillo@gcc.gnu.org, Status: ASSIGNED
<stevenb> that sounds familiar
<stevenb> dnovillo: yes that is the one i was thinking of
<stevenb> dnovillo: there was a better patch that did structs also
<stevenb> dnovillo: but i think i never posted that because it causes quadratic
behavior
<stevenb> dnovillo: the problem being that constructors are not sorted
<stevenb> dnovillo: the patch from that PR also helps the DFA code in
insn-attrtab.c btw
<DannyB> Ah yes, now i remember this whole discussion
<dnovillo> stevenb: what's that about constructors?
<stevenb> dnovillo: the problem with initializers for structs is that they are
represented as constructors, but they are not sorted in any way
<stevenb> dnovillo: so if you go look for what some field is initialized with,
you have to go through the whole constructor
<dnovillo> ah
<stevenb> dnovillo: and if you have to look for a field initializer for all
fields, that is quadratic

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20284


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]