[LLVMdev] [Help Needed] tblgen code get a compile error
Dan Gohman
gohman at apple.com
Tue Jul 7 10:06:12 PDT 2009
On Jul 2, 2009, at 4:40 AM, Howard Su wrote:
> I am working the AVR backend. It is still in the early stage. I got
> the following error:
> [ 86%] Building CXX object lib/Target/AVR/CMakeFiles/
> LLVMAVRCodeGen.dir/AVRISelDAGToDAG.cpp.obj
> AVRISelDAGToDAG.cpp
> C:\llvm-build\lib\Target\AVR\AVRGenDAGISel.inc(596) : error C2664:
> 'llvm::SDNode *llvm::SelectionDAG::SelectNodeTo(llvm::SDNode
> *,unsigned int,llvm::MVT,llvm::MVT,llvm::MVT,const llvm::SDValue
> *,unsigned int)' : cannot convert parameter 6 from 'llvm::SDValue'
> to 'const llvm::SDValue *'
> No user-defined-conversion operator available that can
> perform this conv
> ersion, or the operator cannot be called
>
> I checked the generated the code:
> SDNode *Emit_2(const SDValue &N, unsigned Opc0, MVT VT0)
> DISABLE_INLINE {
> SDValue N0 = N.getOperand(0);
> SDValue N1 = N.getOperand(1);
> SDNode *ResNode = CurDAG->SelectNodeTo(N.getNode(), Opc0, VT0,
> MVT::i8, MVT::Flag, N0, N1); <==== error here.
SelectNodeTo is an overloaded function with many variations
for nodes with different numbers of types and operands. It
looks like there's no overload for 3 types and 2 operands
yet though, so you should add one.
Dan
More information about the llvm-dev
mailing list