<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">A OpenCL C/C++ code can be compiled to LLVM bitcode, so it can be processed by `opt`. But currently to my best knowledge, there is no OpenCL-specific Passes in upstream LLVM.<div class=""><br class=""></div><div class="">-Min<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 17, 2019, at 2:03 PM, Enrique González via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px;white-space:nowrap" class="">Dear all,</span><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class="">I'm newbie in LLVM. I would like to know if it is available an optimizer for OpenCL in LLVM, in the same way as the 'opt' command in LLVM.</span><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><font color="#333333" face="monospace" class=""><span style="font-size:12px" class="">Concretely, if it is possible to perform individual optimizations/transformations over OpenCL code (either at source or bitcode representation) as it can be done for C code using:</span></font><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px;white-space:nowrap" class="">- 'clang' to generate the .bc file(s)</span><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><font color="#333333" face="monospace" class=""><span style="font-size:12px;white-space:nowrap" class="">- 'opt' to perform optimizations/transformations over</span></font><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class="">Is it possible to use the same LLVM 'opt' as for C code, once OpenCL program is translated to bitcode/IR/SPIR?</span><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px;white-space:nowrap" class="">Thanks in advance.</span><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><br style="color:rgb(51,51,51);font-family:monospace;font-size:12px" class=""><span style="color:rgb(51,51,51);font-family:monospace;font-size:12px;white-space:nowrap" class="">Enrique.</span>  <br class=""></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>