I've been getting this error for the last few days:
gmake[3]: Entering directory
`/disk1.1/tigris-slash/usr/home/ben/svn-work/llvm/lib/Transforms/Utils'
llvm[3]: Compiling AddrModeMatcher.cpp for Debug build
In file included from
/disk1.1/tigris-slash/usr/home/ben/svn-work/llvm/include/llvm/Target/TargetLowering.h:26,
from
/disk1.1/tigris-slash/usr/home/ben/svn-work/llvm/include/llvm/Transforms/Utils/AddrModeMatcher.h:24,
from AddrModeMatcher.cpp:14:
/disk1.1/tigris-slash/usr/home/ben/svn-work/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1934:
error: base `llvm::SDNode' with only non-default constructor in class
without a constructor
and, indeed, it appears to be true. Puzzled how this is building for
anyone else, and also not really much clue what to do to fix...
What version of GCC are you using. I suggest GCC 4.2.2, or better. I was getting this bug with GCC 3.4.4, I believe its a compiler bug, but have not had time to look into properly.
Oh by the way there are other Cygwin problems withthe SVN. I just fiex three but AFAIK there is only one more to solve. dont know whether x64 will cause any other problems though. Cygwin is a bit of a raw nerve.
I would like to use intrinsic with different address space.
I defined an intrinsic (used to represent à specific instruction of my target) with a pointer in its arguments, but when calling this intrinsic, if the pointer is not in the generic address space (ie AddrSpace 0), an error occurs ("bad signature").
How can I specify the address space in the intrinsic definition ?
Thank you.
I would like to use intrinsic with different address space.
I defined an intrinsic (used to represent à specific instruction of my target) with a pointer in its arguments, but when calling this intrinsic, if the pointer is not in the generic address space (ie AddrSpace 0), an error occurs ("bad signature").
How can I specify the address space in the intrinsic definition ?
Thank you.
I would like to use intrinsic with different address space.
I defined an intrinsic (used to represent à specific instruction of my target) with a pointer in its arguments, but when calling this intrinsic, if the pointer is not in the generic address space (ie AddrSpace 0), an error occurs ("bad signature").
How can I specify the address space in the intrinsic definition ?
Thank you.
Julien,
If the type of your parameter is llvm_anyptr_ty it should just work with non-default address spaces. I don't immediately see anything actually using this type though, so there may be a bug somewhere. I'd verify that you have defined the intrinsic and then possibly post more information to the list with more details or a test case if it still isn't working.
They should be working as the binary atomics use that mechanism. Whatever frontend is generating the LLVM IR for the intrinsics needs to pass the pointer type to get the correct declaration, e.g.,
llvm::Intrinsic::getDeclaration(Module, IntrinsicID, Tys, NumTys);
Based on the pointer type, the llvm IR will encode the address space into the intrinsic, e.g.,
$result1 = call i32 @llvm.atomic.load.add.i32.p0i32( i32* %ptr, i32 4) // address space 0
$result2 = call i32 @llvm.atomic.load.add.i32.p1i32( i32* %ptr, i32 4) // address space 1
If no Tys are passed, it will default to address space 0.