<p dir="ltr">This is fine. There are other passes in aarch64 you can use as examples. </p>
<br><div class="gmail_quote"><div dir="ltr">On Sat, Feb 20, 2016, 9:34 PM Adam Nemet <<a href="mailto:anemet@apple.com">anemet@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[resending to correct llvm-dev address]<br>
<br>
Hi,<br>
<br>
I’d like to start enabling the loop data prefetch pass for Cyclone (an ARM64 subtarget). AFAICT, you can’t really add passes specifically to a subtarget but only to a target. This makes sense because in the new world, you could have different subtargets per function. I just want to make sure my understanding is correct.<br>
<br>
My plan is to add the pass for the target and then exit the pass early based on a TTI hook (getPrefetchDistance is not set).<br>
<br>
Currently, PowerPC gets around this problem by checking the vendor part of the triple to decide whether the pass should be added. Obviously there is no guarantee that there is a one-to-one mapping between vendor and subtarget.<br>
<br>
Please let me know if there is more preferred way of doing this.<br>
<br>
Thanks,<br>
Adam</blockquote></div>