On Mon, 2005-09-19 at 17:33 -0700, Dale Johannesen wrote: > On Sep 19, 2005, at 5:30 PM, Richard Henderson wrote: > >> (define_insn "*addmixed<mode>3" > >> [(set (match_operand:V2DI 0 "register_operand" "=x") > >> (subreg:V2DI (plus:SSEMODE124 > >> (match_operand:SSEMODE124 2 "nonimmediate_operand" "xm") > >> (subreg:SSEMODE124 (match_operand:V2DI 1 "nonimmediate_operand" > >> "%0") 0)) 0))] > > > > I absolutely will not allow you do add 5000 of these patterns. > > Which is what you'll need if you think you'll be able to solve > > the problem this way. > > Do you have any constructive suggestions for how the RA might be fixed, > then? >
You could start by looking at some "small" thing it gets wrong, and trying to fix it. For example, Kenny and I discovered during his prespilling work that the liveness is actually calculated wrong. It's half-forwards (local), half-backwards (globally), instead of all backwards, which is how liveness is normally calculated, so we discovered that spilling registers wasn't actually changing the liveness calculation due to the forwardness. So we've spent the past week or so making df.c's live register results correct (flow.c had some code that df.c didn't about always live regs, etc), implementing the partial avail liveness stuff in df.c, and making sure the results from df.c are *never* worse than flow.c, through checking the liveness bitmaps against what global.c had before, and verifying that we never had more bits set than it did. Now we have global.c using df.c's liveness, and prespilling is starting to work as expected (IE registers you spill aren't marked live anyway :P). Plus, global is actually slightly faster now, and the SPEC scores are ~1% better *without prespilling*, just from the info being more precise. I imagine it's this type of hard work and debugging that will be necessary to improve the RA. So basically, pick a problem you see, and fix it. --Dan