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]

Re: [PATCH] support to flip modes in sh mode-switching


Christian BRUEL wrote:

Thanks for the pointers. From what I see from #19161, the mode-switching
pass would need to be connected to the register class selection ? That's
more that what it does but that would be interesting to see how it fits. For



No, for SH, you don't have to select different register classes. This is specific to x87->mmx switch, as no values should live in any of registers during the switch. This was achieved by modelling emms to "use" all x87 registers (and similar for efpu insn and MMX register), and this info was propagated over edges to previous blocks. In some cases involving two or more incoming edges, both register sets can become "used" on a BB entry, and no further insn could use neither MMX nor x87 registers.


I was hoping that by your mode-flipping approach, exclusivity of modes can be obtained. This is IMO the same problem as with SH-4a mode flipping patch. Consider the case, where one incoming edge is set to DFmode, while the other is set to SFmode, and somewhere in the BB your insn wants i.e. DFmode. With mode-setting, the situation is clear; you force mode to DFmode before insn. But for mode-flipping approach, do you want to flip mode or not?

Uros.


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