public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/9702: Constant pools are not shared among functions
@ 2003-02-14  9:36 beszedes
  0 siblings, 0 replies; only message in thread
From: beszedes @ 2003-02-14  9:36 UTC (permalink / raw)
  To: gcc-gnats

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]


>Number:         9702
>Category:       optimization
>Synopsis:       Constant pools are not shared among functions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 14 09:36:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Árpád Beszédes
>Release:        gcc version 3.3 20030210 (prerelease)
>Organization:
>Environment:
BUILD & HOST: Linux 2.4.20 i686 unknown
TARGET: arm-unknown-elf
>Description:
Currently all functions have their own constant pool even if they use the same constants. Gcc should merge appropriate constant pools and place this common pool to a location accessible from all appropriate functions.
>How-To-Repeat:
Use the command line below to compile the specified source code:
arm-elf-gcc -S -g0 -Os -o 02.s ./02.c

Attached is the original assembly output where constant pools labeled by .L2 and .L5 could be merged together as shown in the manually edited assembly file.

// 02.c:

# 1 "02.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "02.c"
unsigned int a;
int f1()
{
  return a+2;
}
int f3()
{
  a=12;
}
int main ()
{
  f3();
  return f1();
}

>Fix:
If unit-at-a-time compilation is implemented in gcc, this issue could be solved within gcc more easily.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="cp-sharing.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cp-sharing.tar.gz"

H4sIABuwTD4AA+2Y32/TMBDH+5pK/R+OFqRNJMGxk1TaGELaw3iY4AHxhNDkJk5kkdiVk2yMaf87
tpuGFe2HxGiByZ+qsnN3tuNvemelCId8tGVQhFCaohFCKJonsWlRFK9aA06TEZqnGM/TBMfIxMcJ
GgHa9o0ZuqalCmBUMtXK+u44WrFsF/ezY2YQwRThMJtOxrb/etHxqg24eDNYMlnXVORQccEGaz+m
Ew0vBcuBixbo4WRs2iLa25+MryZjAMXaTgmgL7H2XfduMrjpUXTDUVMuYPCZsMMbc5hZV7F/W7Qn
hH6MzdbXuD//ozmK+/yPE5ys8j91+b8TvLDgFfPW6eyFLfvWmpZWOq89bLplJRe08orI+i+XTHd9
eFF0Imu5FJNxER1o11ugqmzgCJAPS52zTJcMe1EoWjPTtUH26kwwlrPe3zWsOaNCistadrrXz2Kj
dc35qgtAyZuWKWjoOQNW8ZoL2rI81CFVrjxFfAhP8fpKT/nZmGboizbRPLcm853h1aQK+vULqfS9
ykqWHdOuWp57y8zXAZNxeEoONoTQK1jDhVS5R02v4d9XWoTBSpxbRCM/RSObopF/QbSk37XCWp3o
AXmaVtnAG+puKpb+qlhyq2LEKkZuV8wcAoNm5mJDNWP4fd2i+3QzW+FLH5ql3Wpd5F6zfObDVaGN
xlEpvVZ2bbzdwltbZ7E2LPonXeU1o9ZlRzV2lBmx6NPHCrDaVRist2oOWI/6EPtArBQ8Z6L1pifH
xwewd/L+0z6QkABGiCAcIdjTO1asYrRh+9PHHYcIn9Uy5wXXP4xtHQQP1f80IUP9J0mq4zEh2NX/
XfCE6n/yZ+v/+uPKvCvz/32ZvxPFqN7LVqYeeOj9H6Xz9fs/JjHW8foASFz93wXv5AW0UleRJaOt
zrjnOuHqgFVFUGYZBB8hKBEEHxoIJJh3RQhfoR38ZeRwOBwOh8PhcDgcDofD4XA4HI5H8gOrvl1I
ACgAAA==


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-14  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-14  9:36 optimization/9702: Constant pools are not shared among functions beszedes

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