[llvm-dev] Schedule pass for a subtarget?

Eric Christopher via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 22 10:50:14 PST 2016

Yep. That's also a good example :)


On Mon, Feb 22, 2016 at 10:46 AM Adam Nemet <anemet at apple.com> wrote:

> Thanks, Eric.  After talking to Tim, we found one somewhat similar
> example, the Thumb2SizeReduction pass in ARM.   ARM schedules this pass
> unconditionally and then the pass bails if the subtarget only supports
> Thumb1, etc.
> Adam
> On Feb 20, 2016, at 10:20 PM, Eric Christopher <echristo at gmail.com> wrote:
> This is fine. There are other passes in aarch64 you can use as examples.
> On Sat, Feb 20, 2016, 9:34 PM Adam Nemet <anemet at apple.com> wrote:
>> [resending to correct llvm-dev address]
>> Hi,
>> 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.
>> 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).
>> 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.
>> Please let me know if there is more preferred way of doing this.
>> Thanks,
>> Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160222/88f75be1/attachment.html>

More information about the llvm-dev mailing list