[LLVMdev] How can I get rid of "OPFL_Chain" in myCPUGenInstrInfo.inc

hilbert Wang huaibo.wang at gmail.com
Fri Apr 25 22:20:59 PDT 2014


hi Tim,guys,

 it was regarding  splitting 16-bit ADDC to two 8-bit ADDC+ADDE.

the 8-bit ADDE instruction is defined as:


let Constraints="$dst=$op0",mayStore=1,
hasSideEffects=0,neverHasSideEffects=1 in

def ADDErm: myInstr
<0x0,
(outs Intregs:$dst) (ins Intregs:$op0,MEMi:$op1),
"",
[set IntRegs:$dest (adde IntRegs:$op0, (load ADDRi:$op1))]
>

very unlucky, this instruction failed.

in the generated match table, there was flag OPFL_Chain.

it caused a token factor node to be created in  switch case
OPC_EmitMergeInputChains in SelectCodeCommon.

very bad, all uses of  input chain was replaced with ADDErm  Node.

so the created token factor node depends on the ADDErm node  after the
replacement.


very bad the ADDCrm node depends on above token factor.

because of the glue, a cycle formed. ADDE-->ADDC-->TF-->ADDE.


after I removed the flag OPFL_Chain in the match table, the problem was
gone.


So, my question was obvious:how could I make the table gen tool  not add
the said flag?




thanks

hilbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140426/01052085/attachment.html>


More information about the llvm-dev mailing list