<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Bjarke,<div class=""><br class=""></div><div class="">Without being an expert on the details of architectures targeted by CUDA, here are some high level observations regarding pass pipelines for GPUs:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>- The set of CFG optimizations you want is likely to be quite different.  JumpThreading in particularly is typically not desirable.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>- Most modern GPUs are going to want specialized passes (scalarization, speculative execution) inserted at various points in the pipeline.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- A lot of GPUs are very sensitive to loop unrolling to eliminate dynamic accesses.</div><div class=""><br class=""></div><div class="">From there, your mileage will vary based on whether you’re doing online or offline compilation.  I’m guessing the latter for CUDA.</div><div class=""><br class=""></div><div class="">—Owen</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 14, 2015, at 8:05 PM, Bjarke Roune <<a href="mailto:broune@google.com" class="">broune@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Owen,</div><div class=""><br class=""></div><div class="">You mentioned at <a href="http://reviews.llvm.org/D9360" class="">http://reviews.llvm.org/D9360</a> that the optimization pipeline set up in PassManagerBuilder has not worked well for GPUs in your experience. So I'd like to try out an alternative to PassManagerBuilder for CUDA. Do you have a suggestion for what I might try instead of PassManagerBuilder? If you happen to have a replacement for it that I could try, that would be great.</div><div class=""><br class=""></div><div class="">Bjarke<br class=""></div></div>
</div></blockquote></div><br class=""></div></body></html>