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] |
On 03/25/2010 11:22 PM, Jeff Law wrote:If the code is clean and doesn't add significant compile-time overhead, it'd probably be accepted.Thanks Bernd and Jeff.
I never bothered to implement hoisting which touched hard regs -- I never thought the cost/benefit analysis made much sense. It's quite a bit more work to implement and code motion of hard regs is much more restricted than code motion involving just pseudos.
This case is not common. I'm wondering how likely this kind of optimization pass will be accepted into GCC.
Well, the register allocator will already attempt to allocate REG to r0 -- when it sees a copy between a pseudo and a hard reg it will adjust its cost model appropriately to encourage the pseudo to be allocated to the hard reg (thus eliminating the copy).
Another way to fix it is teaching register allocator to allocate r0 to REG. But I guess it's more difficult.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |