I understand now. Thanks! <br><br><div>Does the new patch look good to you? </div><div><br></div><div>Jingyue</div><br><div class="gmail_quote">On Mon Sep 29 2014 at 9:30:11 PM Owen Anderson <<a href="mailto:resistor@mac.com">resistor@mac.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Sep 29, 2014, at 2:33 PM, Jingyue Wu <<a href="mailto:jingyue@google.com" target="_blank">jingyue@google.com</a>> wrote:<br>
<br>
> Hi Owen,<br>
><br>
> I made the threshold a pass paramter in this patch. However, it doesn't look<br>
> pretty because there are several layers between createCFGSimplificationPass and<br>
> the actual use of this threshold (e.g. CFGSimplifyPass and SimplifyCFGOpt).<br>
><br>
> What are the benefits of having these pass parameters? I saw other passes such<br>
> as JumpThreading and LoopUnroll have such pass parameters too, but none of them<br>
> seem actually used. One way I can think of using that is target-specific code<br>
> can create these passes with a customized threshold, but in that case, I feel<br>
> TargetTransformInfo would be a better home.<br>
<br>
The use case is for embedded uses of LLVM, to allow the client to have programmatic control.  We do something similar with loop unrolling thresholds, and I’d like to evolve the rest of the passes in that direction as well.<br>
<br>
—Owen</blockquote></div>