This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23756] Missed optimization for PIC code with internal visibility
- From: "christophe dot guillon at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 16:20:28 -0000
- Subject: [Bug middle-end/23756] Missed optimization for PIC code with internal visibility
- References: <bug-23756-7904@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from christophe dot guillon at st dot com 2010-01-28 16:20 -------
Thanks for the detailled reply, I fully agree with your points:
- first, indeed, it's a matter of choice in the ABI (or compiler), the
assumption would be that a function that call another function of the same
module
(or a function of an undetermined module) must set the GP as soon as its own
visibility is hidden or more visible. What happens actually on the code that I
am optimizing is that generally it is better to have the parent function
setting the GOT pointer and that most of the time it is set anyway. Hence I
just observe that this choice, which is made on some architectures is a good
trade-off.
Thus it is indeed a request for enhancement on the pair ABI/compiler.
- second, it will be a good motivating case in the context of interprocedural
analysis.
It can be considered in this case as a request for enhancement in the
interprocedural analysis framework.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23756