This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/15239] suboptimal mult-by-const expansion cost limit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]