<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 10, 2013, at 2:32 PM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 10, 2013 at 1:23 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><div>
On Jul 10, 2013, at 12:30 PM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
On Wed, Jul 10, 2013 at 11:53 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>
<div>On Jul 10, 2013, at 11:39 AM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

On Wed, Jul 10, 2013 at 11:26 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>On Jul 10, 2013, at 11:18 AM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div>


<blockquote type="cite"><div dir="ltr">On Wed, Jul 10, 2013 at 3:03 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br><div class="gmail_extra">


<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Jun 27, 2013, at 3:57 PM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:<br>




</div><div>> Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics when it sees pow*(). This may not be suitable for all targets (for example PNaCl), so the attached patch adds a target hook that CodeGen queries. The target can state its preference for having or not having the intrinsic generated. Non-PNaCl behavior remains unchanged; PNaCl-specific test added.<br>




<br>
</div>Isn't a more straightforward and less invasive approach to just invoke the compiler with -fno-builtin=pow or something along those lines?<br></blockquote><div><br></div><div>We don't control the flags users supply to Clang though. </div>


</div></div></div></blockquote><div><br></div></div>Then handle it in the driver.</div></blockquote><div><br></div><div>Would that not be more intrusive, then? Or perhaps I'm misunderstanding what you're proposing.</div>


</div></div></div></blockquote><br></div><div>It would be isolated to target-specific logic in target-specific parts of the toolchain instead of inventing a new option that's basically "do what PNaCl wants" and then propagating it through the entire compiler.</div>

</div></blockquote><div><br></div><div>Clang currently supports le32 as a target. So it's not an issue of a single "driver wrapper". We purposefully keep PNaCl as open as possible, and other developers and toolchain writers may use this target to generate PNaCl bitcode or something similar with Clang.</div>
</div></div></div></blockquote><div><br></div></div>I'm not asking you to wrap the driver.  I'm asking you to change clang's driver logic when targeting *-*-nacl to use the existing logic to suppress builtin treatment of functions.</div>
</div></blockquote><div><br></div><div>Oh, it turns out Clang does not currently support -fno-builtin-<FUNC> at all: </div><div><a href="http://llvm.org/bugs/show_bug.cgi?id=4941">http://llvm.org/bugs/show_bug.cgi?id=4941</a></div>
</div></div></div></blockquote><br></div><div>What functions do you want to opt out of builtin treatment?  All of them?  Just math functions?</div><div><br></div><div>John.</div><br></body></html>