<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 4:10 AM Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11 March 2015 at 23:00, Pete Cooper <<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>> wrote:<br>
> This patch schedules another pass of Thumb2SizeReduction before the PostRA<br>
> scheduler.  This pass is only for functions with minsize set on them.  It<br>
> results in the mov being converted to Thumb2 before the PostRA scheduler and<br>
> so the code now becomes<br>
<br>
Hi Pete,<br>
<br>
+  if (getOptLevel() != CodeGenOpt::None && !getARMSubtarget().<u></u>isThumb1Only())<br>
<br>
This doesn't guarantee (Oz && T2). Wouldn't you have to be specific at<br>
least regarding CodeGenOpt?<br>
<br></blockquote><div><br></div><div>Neither of these is the right way to handle adding this pass. What needs to happen is either a) for now a custom hook, or b) add some code to enable the pass to be able to run custom code to decide whether or not to run the pass on particular code. I did, in fact, clean up a bunch of this in the ARM pass manager recently - for this particular pass.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, the same pass has already been added in some cases on the code<br>
above, you don't want to add two identical passes, even if they have<br>
different parameters. Maybe create a boolean OnlyMinSize from opt+t2<br>
flags, and pass it to the already existing addPass()?<br>
<br>
The tests are good and the rest looks good to me. Thanks!<br>
<br>
cheers,<br>
--renato<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>