[llvm-commits] [llvm] r77904 - in /llvm/trunk: include/llvm/CodeGen/RegisterScavenging.h lib/CodeGen/RegisterScavenging.cpp test/CodeGen/Blackfin/load-intr.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sun Aug 2 23:53:55 PDT 2009
On 03/08/2009, at 07.42, Evan Cheng wrote:
>>
>> But this part is OK, right? <imp-def> can redefine a live register.
>
> It shouldn't. Are you talking about re-defining part of a larger
> register? In that case, it should first kill the larger register and
> then redefine it. At least that's what livevariable does. It's unclear
> if it's realistic to enforce this in register scavenger. This might be
> too difficult to maintain. I need to see an example.
At least that makes the rules clearer - no special treatment for
implicit operands. This means that you must always know if a register
is dead or alive before use use of define it in any way. It could work.
I don't think the scavenger should enforce this rule through
assertions. A double define does not break the scavenger in any way,
it just makes it a bit less efficient - it is a missed available
register, that is all. I think the machine code verifier should catch
these bugs, and the scavenger should only assert when stuff would break.
Use of undefined registers is another matter. It means that a register
was killed too soon, and the scavenger could mistakenly overwrite it.
That would be bad, and an assert is in order.
I will implement the strict rules in the verifier. Then we can see how
bad the status quo is and get some examples of breakage.
/jakob
More information about the llvm-commits
mailing list