<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 3:01 AM, Samuel F Antao via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">







<p>OpenMP (Host IR has to be read by the device to determine which declarations have to be emitted and the device binary is embedded in the host binary at link phase through a proper linker script):<br></p>
<p><span>Src -> Host PP -> A</span></p>
<p><span>A    -> HostCompile -> B</span></p>
<p><span>A,B -> DeviceCompile -> C</span></p></div></blockquote><div>I think even for some OpenMP targets it might be better to allow using device PP (and corresponding headers) due to target specific macro. For example, some function may have target specific version and host version with #ifdef's on CPU type that allows to have completely different implementation on host and on target.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p><span>C    -> DeviceAssembler -> D</span></p>
<p><span>E    -> DeviceLinker -> F</span></p></div></blockquote><div>I suspect that you meant D instead of E here, isn't it?</div></div></div></div>