On 11/22/2013 10:51 PM, Erik Schnetter wrote:
> I managed to make the address spaces work for atomic operations. I still
> see a build failure when linking OpenCL kernels. Does anybody else see such
> failures with llvm-3.4? (llvm-3.3 works fine for me.)
It was not only a build failure. Workgroup launcher generation failed
as LLVM 3.4 now disallows using 'bitcast' for casting between pointers with
different address spaces. The pointer arguments in the generated launcher
function used bitcasts. All tests crashed due to this. I pushed a fix.
Now the problem is due to the printf. It now takes a constant argument and
lots of tests use it to print out verification data, now failing to build
due to:
/tmp/poclLvSsKQ//program.cl:66:12: error: passing '__constant char *' to
parameter of type 'const char *' changes address space of pointer
printf("char->short conversion failed\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In LLVM 3.4 the constant strings are now LLVM IR module global constant
AS char arrays. The current printf() works on const char* which is in
the AS 0 (private). Perhaps we can copy the constant char type
string to a private const char* before calling the actual printf?
printf doesn't have to be fast as it's used for debugging/verification
anyways.
--
Pekka
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel