This is the mail archive of the gcc-patches@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] |
There are ways to improve register allocation for DImode without going to extremes like the patch I posted on Monday. The attached patch is quite simple and fixes two issues I noticed while working on the DCE patch I posted earlier. First, when we set DImode registers in a sequence of multiple SImode accesses, we emit a clobber at the start of the sequence to tell life analysis that the register is dead above this point. Scheduling can move these clobbers, extending the lifetime as far as IRA is able to tell. The changes in ira-lives.c make us move these clobbers downwards as far as possible. This may sometimes help even for single-word regs that are initialized with a sequence of partial sets involving zero_extract. The changes in the lower-subreg pass are motivated by nonsensical transformations like the following: -(insn 205 204 26 4 (set (reg:DI 68) - (reg:DI 178)) 49 (REG_DEAD (reg:DI 178) +(insn 261 204 262 4 (clobber (reg:DI 193)) + +(insn 262 261 263 4 (set (subreg:SI (reg:DI 193) 0) (reg:SI 191)) + +(insn 263 262 264 4 (set (subreg:SI (reg:DI 193) 4) (reg:SI 192)) + +(insn 264 263 26 4 (set (reg:DI 68) (reg:DI 193)) In resolve_simple_move, we generate a new DImode temporary pseudo rather than storing into the DImode pseudo which is the actual destination. This, I think, is due to confusion about the use of can_decompose_p; it makes sense to use it in this context only for hard regs. For pseudos, it tests the non_decomposable_context bitmap, which is irrelevant here. Bootstrapped and regression tested on i686-linux. Ok? Bernd
Attachment:
ira-clobber2.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |