Hi Jakob,<br><br>I believe Hal is trying to enable register scavenger to find two (or more) registers that can be used as temporaries.<br><br>One problem I see with this approach is that, if you use register scavenger during PEI, you will have to pessimistically set aside two emergency spill slots before you call scavengeRegister, even if it turns out you only need one. Having an extra stack slot might not be a big problem, but still it is nice if we can avoid allocating a slot unnecessarily.<br>
<br>I probably won't need these pseudo instructions that are expanded post-RA in the first place if I can tell the register allocators to spill accumulator registers to general purpose integer registers instead of directly to stack and disallow copying between accumulator registers. But I guess that is a much more difficult problem to solve. Is that right?<br>
<br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 1:06 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
On Mar 25, 2013, at 12:04 PM, Akira Hatanaka <<a href="mailto:ahatanak@gmail.com" target="_blank">ahatanak@gmail.com</a>> wrote:<br>
<br>
> This patch adds parameter "EliminateFI" to RegScavenger::scavengeRegister, which tells register scavenger not to eliminate frame index of the emergency spill slot if set to false.<br>
><br>
> I have pseudo load, store and copy instructions which are generated during register allocation and expanded post-RA but before the final stack size is known. I use register scavenger to search for a temporary integer GPR that is used during pseudo-expansion.<br>
><br>
> This is what happens during pseudo-expansion:<br>
><br>
> The following pseudo<br>
><br>
> LoadAC $acc, FI // Pseudo load instructions. Load from FI to accumulator $acc.<br>
><br>
><br>
> is expanded into this sequence:<br>
><br>
> LW $reg, FI // load from FI to temporary GPR $reg<br>
> MTLO $reg // copy $reg to register LO<br>
> LW $reg, FI + 4 // load from FI+4 to GPR $reg<br>
> MTHI $reg // copy $reg to register HI<br>
<br>
</div></div>Hi Akira,<br>
<br>
The register scavenger is not really supposed to be used in more than one pass, because you would need to allocate a separate emergency spill slot for each pass.<br>
<br>
I think Hal is trying to solve a very similar problem for PPC.<br>
<br>
Hal, are you expanding pseudos during PEI?<br>
<span><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br>