<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>The GCC doc for the option is: </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><br><br>Sent from my iPhone</div><div><br>On Mar 23, 2016, at 3:10 PM, Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br><br></div><blockquote type="cite"><div><span>hans added a comment.</span><br><span></span><br><span>In <a href="http://reviews.llvm.org/D18321#381998">http://reviews.llvm.org/D18321#381998</a>, @echristo wrote:</span><br><span></span><br><blockquote type="cite"><span>So having it as a function attribute was my idea :)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Otherwise, it's a good question. What should happen in LTO when you ask for one translation unit to be compiled without jump table support and the other one to be compiled with jump table support? Which one wins here? For some things it's more obvious, I'm not sure here.</span><br></blockquote><span></span><br><span></span><br><span>I suppose it depends on the motivation for this patch. </span>Why would one be compiling with -no-jump-tables? Is it just an optimization thing, or could there be a situation where a jump table would actually not work, despite the target supporting it in general? (Apologies if this is obvious, but it would be great to have it explained in the description of this patch.)</div></blockquote><div><br></div><div>The doc for this option in GCC says:</div><div><br></div><div><br></div><div><dt><code style="background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody">-fno-jump-tables</font></code></dt><dd><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><a name="index-fno-jump-tables-1195"></a>Do not use jump tables for switch statements even where it would be more efficient than other code generation strategies. This option is of use in conjunction with <samp>-fpic</samp> or <samp>-fPIC</samp>for building code that forms part of a dynamic linker and cannot reference the address of a jump table. On some targets, jump tables do not require a GOT and this option is not needed. </span></font></dd><dd><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></dd></div><br><blockquote type="cite"><div><span></span><br><span></span><br><span><a href="http://reviews.llvm.org/D18321">http://reviews.llvm.org/D18321</a></span><br><span></span><br><span></span><br><span></span><br></div></blockquote></body></html>