[LLVMdev] Inserting nodes into SelectionDAG (X86)
Dale Johannesen
dalej at apple.com
Wed Jul 1 14:38:40 PDT 2009
On Jul 1, 2009, at 2:22 PMPDT, Dan Gohman wrote:
>> Ops.push_back(DAG.getConstant(1, MVT::i32));
>> Chain = DAG.getNode(ISD::ADD, DAG.getVTList(MVT::Other, MVT::i32),
>> &Ops[0], Ops.size());
>>
>> Isn't that the way how it is supposed to work?
>
> ADD does not use a chain, so there's no chain operand, or
> MVT::Other result for it in an ADD node.
You might want to look at SelectionDAGNodes.h, that has some
(informal) description of what operands and results the nodes have.
More information about the llvm-dev
mailing list