This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/15239] suboptimal mult-by-const expansion cost limit
- From: "l_belev at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2004 14:26:22 -0000
- Subject: [Bug middle-end/15239] suboptimal mult-by-const expansion cost limit
- References: <20040430234603.15239.l_belev@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From l_belev at yahoo dot com 2004-05-01 14:26 -------
(In reply to comment #5)
> IMO the number of cycles vary much more from one
> instruction to another than the number of code bytes, no matter what the
> architecture is.
I'l try to express this in clearer way.
Said otherwise: by limiting number of cycles in order to limit code size,
we effective go through 2 approximations - first we approximate the number
of the instructions with the number of cycles and then we approximate the
number of bytes with the number of instructions:
num_cycles -> num_insns -> num_bytes. This way the end result could
be too far from what we wanted. While directly limiting the num_bytes
is hard to do in the middle-end (it's in the back-end's competence), we could
at least limit the num_insns, and so avoid one of the two approximations.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15239