[LLVMdev] implicit CC register Defs cause "physreg was not killed in defining block!" assert

Christian Sayer Christian.Sayer at dibcom.fr
Mon Jan 12 09:33:10 PST 2009


Evan,

>A physical register cannot be live across the block. So it
>must have a use in the block or it must be marked dead. From
>your dump, it looks like the CCFLAGS defs are not being marked
>dead. It's unclear where things went wrong, but you can step
>through LiveVariables to debug this.

Thanks for your response. I did quite some stepping through the llc
passes, and it turned out what now looks fairly obvious:
The instructions containing the CCFLAGS which are not marked dead
in the dump below (line 3+) are reg-to-reg copies inserted by the PHI elimination.
In my backend, a mov instruction is currently implemented as an add with
constant 0 (affecting condition codes).
Now LiveVariables gets executed before PHI elimination, so I am trying
to figure out if there is code in PNE which is supposed to update the
defs. Otherwise I might try to re-run LiveVariables after PNE, or
some similiar approach combining these two passes - unless you tell
me they don't get marked dead because of an implementation flaw in my
backend (or something completely else : )

Thanks again,
Christian


>>        %reg1033<def> = addC %reg1025<kill>, 0, %CCFLAGS<imp-def,dead>
>>        %reg1032<def> = addC %reg1024<kill>, 0, %CCFLAGS<imp-def,dead>
>>        %reg1095<def> = addC %reg1028, 0, %CCFLAGS<imp-def>
>>        %reg1096<def> = addC %reg1029<kill>, 0, %CCFLAGS<imp-def>
>>        %reg1097<def> = addC %reg1033<kill>, 0, %CCFLAGS<imp-def>
>>        %reg1098<def> = addC %reg1028<kill>, 0, %CCFLAGS<imp-def>
>>        %reg1099<def> = addC %reg1031<kill>, 0, %CCFLAGS<imp-def>
>>        %reg1100<def> = addC %reg1030, 0, %CCFLAGS<imp-def>
>>        %reg1101<def> = addC %reg1032<kill>, 0, %CCFLAGS<imp-def>
>>        %reg1102<def> = addC %reg1030<kill>, 0, %CCFLAGS<imp-def>
>>        br mbb<ifcont267,0x12bc518>






--








sorry about that, but there is nothing I can do about it:

CONFIDENTIAL NOTICE: The contents of this message, including any attachments, are confidential and are intended solely for the use of the person or entity to whom the message was addressed. If you are not the intended recipient of this message, please be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify the sender. Please also permanently delete all copies of the original message and any attached documentation. Thank you.




More information about the llvm-dev mailing list