[Polly][PM] Register polly passes with the opt tool for the new-pm path
authorPhilip Pfaffe <philip.pfaffe@gmail.com>
Fri, 4 Aug 2017 09:28:09 +0000 (09:28 +0000)
committerPhilip Pfaffe <philip.pfaffe@gmail.com>
Fri, 4 Aug 2017 09:28:09 +0000 (09:28 +0000)
commit59d690b96c04599042f348d8843115639b13c613
tree74676b5cdc82512f4009fa9c5bfb3f183e8d17ee
parenta5bc09a86f3bbd5836cf2a86566c459b866b2935
[Polly][PM] Register polly passes with the opt tool for the new-pm path

Summary: When polly is linked into the tools because of the LLVM_POLLY_LINK_INTO_TOOLS option being set, we need to register its passes with the PassBuilder. Because polly is linked in, we can directly call its callback registration method, which registers the appropriate callbacks with the new PM's PassBuilder. This essentially follows exactly the way it worked with the legacy PM.

Reviewers: grosser, chandlerc, bollu

Reviewed By: grosser

Subscribers: pollydev, llvm-commits

Differential Revision: https://reviews.llvm.org/D36273

llvm-svn: 310043
llvm/tools/opt/NewPMDriver.cpp