public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/14179] [3.3/3.4/4.0 Regression] out of memory
Date: Thu, 23 Sep 2004 01:37:00 -0000	[thread overview]
Message-ID: <20040923013702.3845.qmail@sourceware.org> (raw)
In-Reply-To: <20040217171044.14179.debora.j.estey@lmco.com>


------- Additional Comments From mark at codesourcery dot com  2004-09-23 01:37 -------
Subject: Re:  [3.3/3.4/4.0 Regression] out of memory

giovannibajo at libero dot it wrote:

>>The most common case is probably that the "from" 
>>and "to" types are the same.  So, you could try having 
>>implicit_conversion do "if same_type_p (to, from) && !class_type return 
>>identity conversion".  (Might even be better just to check pointer 
>>equality of "to" and "from", so as to avoid the cost of same_type_p if 
>>they are *not* the same.)  That would short-circuit a lot of the work, 
>>and might win for other test cases as well, because you save not only on 
>>digest_init, but with function calls like:
>>  void f(int);
>>  void g() { f(3); }
>>    
>>
>
>Yes, but the problem is that also default promotions are very common:
>
>void f(char);
>void g() { f(3); }
>
>and this is what we need to short-circuit for the testcase to start saving 
>memory. I tried something like:
>
>  if (INTEGRAL_TYPE_P (to) && INTEGRAL_TYPE_P (from)
>      && same_type_p (type_promotes_to (to), type_promotes_to (from)))
>      return ocp_convert (to, expr, CONV_IMPLICIT, flags);
>
>but I'm not sure about those type_promotes_to, plus it segfaults for some 
>reason I'm investigating...
>  
>
I don't know about the segfault, but I'd worry that you might not win 
much once the tests get that complex, at least for code other than this 
one test case.  Giant arrays with huge initializers are not the typical 
case, thankfully.



-- 


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


  parent reply	other threads:[~2004-09-23  1:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-17 17:10 [Bug c++/14179] New: " debora dot j dot estey at lmco dot com
2004-02-17 17:15 ` [Bug c++/14179] " debora dot j dot estey at lmco dot com
2004-02-17 17:25 ` debora dot j dot estey at lmco dot com
2004-02-17 17:52 ` giovannibajo at libero dot it
2004-02-17 18:00 ` [Bug c++/14179] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-17 18:10 ` pinskia at gcc dot gnu dot org
2004-03-08 23:08 ` mmitchel at gcc dot gnu dot org
2004-06-07  3:25 ` pinskia at gcc dot gnu dot org
2004-09-15 14:27 ` [Bug c++/14179] [3.3/3.4/4.0 " giovannibajo at libero dot it
2004-09-15 16:30 ` mark at codesourcery dot com
2004-09-17 18:50 ` giovannibajo at libero dot it
2004-09-18 13:10 ` giovannibajo at libero dot it
2004-09-20 23:05 ` cvs-commit at gcc dot gnu dot org
2004-09-21 21:12 ` cvs-commit at gcc dot gnu dot org
2004-09-21 22:50 ` cvs-commit at gcc dot gnu dot org
2004-09-21 23:46 ` cvs-commit at gcc dot gnu dot org
2004-09-22  0:36 ` giovannibajo at libero dot it
2004-09-22  0:38 ` giovannibajo at libero dot it
2004-09-22  0:43 ` giovannibajo at libero dot it
2004-09-22  0:54 ` mark at codesourcery dot com
2004-09-22 13:51 ` bonzini at gnu dot org
2004-09-22 15:33 ` mark at codesourcery dot com
2004-09-22 15:39 ` mmitchel at gcc dot gnu dot org
2004-09-22 15:43 ` paolo dot bonzini at polimi dot it
2004-09-22 15:54 ` mark at codesourcery dot com
2004-09-22 15:56 ` paolo dot bonzini at polimi dot it
2004-09-23  0:02 ` giovannibajo at libero dot it
2004-09-23  0:16 ` mark at codesourcery dot com
2004-09-23  1:00 ` giovannibajo at libero dot it
2004-09-23  1:37 ` mark at codesourcery dot com [this message]
2004-09-24 16:02 ` bonzini at gcc dot gnu dot org
2004-09-24 16:06 ` bonzini at gcc dot gnu dot org
2004-09-24 16:53 ` mark at codesourcery dot com
2004-09-24 18:53 ` bonzini at gnu dot org
2004-09-24 18:54 ` [Bug c++/14179] array parsing could be made faster bonzini at gcc dot gnu dot org
2004-09-25  0:50 ` [Bug c++/14179] [3.3/3.4/4.0 Regression] " giovannibajo at libero dot it
2004-10-26 16:11 ` [Bug c++/14179] [3.3/3.4/4.0 Regression] out of memory while parsing array with many initializers debora dot j dot estey at lmco dot com
2004-10-26 16:14 ` pinskia at gcc dot gnu dot org
2004-10-27 15:43 ` giovannibajo at libero dot it
2004-12-23 12:35 ` steven at gcc dot gnu dot org
2004-12-24  2:23 ` giovannibajo at libero dot it
2004-12-24  7:07 ` steven at gcc dot gnu dot org
2005-04-21  5:03 ` [Bug c++/14179] [3.3/3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-05-03 22:44 ` debora dot j dot estey at lmco dot com
2005-07-08  1:43 ` [Bug c++/14179] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-25  1:39 ` pinskia at gcc dot gnu dot org
2005-09-27 16:14 ` mmitchel at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040923013702.3845.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).