public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/63556] New: gcc should dedup string postfixes
@ 2014-10-16  8:53 andi-gcc at firstfloor dot org
  2014-10-16  8:54 ` [Bug middle-end/63556] " andi-gcc at firstfloor dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-10-16  8:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63556

            Bug ID: 63556
           Summary: gcc should dedup string postfixes
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andi-gcc at firstfloor dot org

With this code:

extern void func(char *a, char *b);

void f(void)
{
        func("abc", "xabc");
        func("abc", "abc");
}

we get:

.LC0:
        .string "xabc"
.LC1:
        .string "abc"

So the "abc"s get deduped. But it could also dedup the postfix by pointing
"abc" to "xabc" + 1. This would save some space.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-13 13:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16  8:53 [Bug middle-end/63556] New: gcc should dedup string postfixes andi-gcc at firstfloor dot org
2014-10-16  8:54 ` [Bug middle-end/63556] " andi-gcc at firstfloor dot org
2014-10-16  9:07 ` rguenth at gcc dot gnu.org
2014-10-16  9:27 ` schwab@linux-m68k.org
2024-06-11 17:39 ` andi-gcc at firstfloor dot org
2024-06-13  9:23 ` xry111 at gcc dot gnu.org
2024-06-13  9:24 ` xry111 at gcc dot gnu.org
2024-06-13  9:40 ` jakub at gcc dot gnu.org
2024-06-13 13:43 ` andi-gcc at firstfloor dot org
2024-06-13 13:49 ` pinskia at gcc dot gnu.org

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).