<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 June 2014 12:53, Tom Roeder <span dir="ltr"><<a href="mailto:tmroeder@google.com" target="_blank">tmroeder@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On Tue, Jun 3, 2014 at 3:37 PM, Nick Lewycky <<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>> wrote:<br>
> + static cl::opt<bool><br>
> + BuildJumpInstrTables(<br>
> +     "build-jump-instr-tables", cl::Hidden, cl::init(false),<br>
> +     cl::desc("Build jump-instruction tables for address-taken<br>
> functions"));<br>
><br>
> No. Firstly, such globals are forbidden on the grounds that they're<br>
> thread-unsafe, consider TargetOptions instead. Yes we still have some, no<br>
> you can't add more. It looks like this controls whether we actually do the<br>
> jump-table substitution. Please remove it, replacing it with true. We<br>
> already have a control for whether to do jump instruction tables, and that's<br>
> the presence or absence of the "jumptable" attribute on each function.<br>
<br>
</div>There's also another flag: it's in JumpInstrTables.cpp and it selects<br>
the type of table to build. From your comments, it sounds like the<br>
right thing to do with it is to put it into TargetOptions and add a<br>
constructor to JumpInstrTables that specifies the type of table to<br>
use.<br></blockquote><div><br></div><div>For the benefit of the public review log, I thought I had sent out this email, but it was still a draft:</div><div><br></div><div>Yes, you are correct. Maybe you can make the JumpInstrTablesPass take an argument in its constructor and thread it through LLVMTargetMachine for instance?</div>

<div><br></div><div>I OK'd the patch to land when Tom asked me about it offlist.</div></div></div></div>