This is the mail archive of the gcc@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]

Re: loop hoisting fails


On 09/02/11 15:57, Ian Lance Taylor wrote:

For your processor it sounds like you should make a constant more
expensive than a register for an outer code of SET.  You're right that
the cost should really depend on the destination of the set but
unfortunately I don't know if you will see that.

Increasing the cost of constants slightly for outer code set actually works. It blocks cse from doing the transformation but then gcse comes and does the transformation without consulting costs. That makes the cost change pretty useless.


Also, saying that 0 with a set is slightly more expensive than a register is also a mistake since it depends on the destination of the 0. But then again I guess this is a gcc constraint which everyone has probably to live with.


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