Thanks for your response. I'm just now realizing that keeping track of <kill> flags is harder than I thought it would be.<div><br></div><div>Regards,</div><div><br></div><div>Isaac</div><div><br><br><div class="gmail_quote">
On Mon, Nov 29, 2010 at 10:47 AM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk">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 class="im"><br>
On Nov 28, 2010, at 8:29 PM, Isaac Asay wrote:<br>
><br>
> I am continuing to look over the code in the ARMLoadStoreOptimizer.cpp file, but I was wondering if you had a specific suggestion or a documentation resource that I could use to perform this instruction rearrangement in an LLVM idiomatic way. Using my algorithm, I already know where I can move MachineInstrs without effecting program correctness, but I don't know how I can reorder the MachineInstrs while maintaining all the associated live-range information.<br>

<br>
</div>After register allocation is complete, liveness information is kept in the live-in lists on basic blocks, and kill flags on register operands.<br>
<br>
Simply put, a register is live from a <def> operand to a <use,kill> operand. It must not be used when it isn't live.<br>
<br>
The rules get tricky when sub-registers are involved.<br>
<br>
Your best bet for documentation is to read MachineVerifier.cpp and perhaps RegisterScavenging.cpp.<br>
<br>
If you are rearranging instructions, you must make sure that any kill flags are moved to the last instruction using a register.<br>
<font color="#888888"><br>
/jakob<br>
<br>
</font></blockquote></div><br></div>