Sorry, I forgot to tell you the Clang and LLVM revisions I'm using:<div><br></div><div>Clang: r130668 </div><div>LLVM: r130661</div><div><br></div><div>I'm using them because they were the latest ones when I started with my project in July 2011.</div>



<div><br></div><div>Thanks so much again!<br><br><div class="gmail_quote">El 13 de marzo de 2012 13:28, Jorge Fernández Fabeiro <span dir="ltr"><<a href="mailto:fabeirojorge@gmail.com" target="_blank">fabeirojorge@gmail.com</a>></span> escribió:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<div><br></div><div>I'm working in a project about source-to-source code transformations and I've just programmed a tool using Clang libraries (it's a program I've written in C++, it doesn't use Clang command-line tools at all) that visits the code of some given "for" loops and apply some optimization transformations (now, only loop unrolling). </div>





<div><br></div><div>Till today I've been testing the tool with OpenCL kernels that operate with integers or floats, but now I'm trying to process a kernel that operates with doubles, and, unfortunately the tool crashed. First, I tried to dump the CompoundStmt that represents the body of a visited "for" loop, and I discovered that it's empty when the visited code contains any reference to double variables. After this shocking problem, I replaced the "double" variables with "float" ones and all went smooth. Considering that workaround, I also tried to emit the LLVM representation of my OpenCL kernel with doubles, and clang gave me this error: "error: use of type 'double' requires cl_khr_fp64 extension to be enabled".</div>




<div><br></div><div>So, is there any method or flag in the classes of the libraries in order to enable this extension?</div><div><br></div><div>Thanks so much in advance,</div><div><br></div><div>Jorge.</div><div><br></div>




<div><br></div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>
</blockquote></div><br></div>