[Polly][PM][WIP] Polly pass registration
commit7b45564f6289baa8dd2c86a30ed32509126014a3
authorPhilip Pfaffe <philip.pfaffe@gmail.com>
Wed, 2 Aug 2017 15:52:25 +0000 (2 15:52 +0000)
committerPhilip Pfaffe <philip.pfaffe@gmail.com>
Wed, 2 Aug 2017 15:52:25 +0000 (2 15:52 +0000)
tree6a9fbfdf4f70188462872e3e24b76834e51b2465
parent0a68c5ac904b9792b56dd51ba61d6dea124f24dd
[Polly][PM][WIP] Polly pass registration

Summary:
This patch is a first attempt at registering Polly passes with the LLVM tools. Tool plugins are still unsupported, but this registration is usable from the tools if Polly is linked into them (albeit requiring minimal patches to those tools). Registration requires a small amount of machinery (the owning analysis proxies), necessary for injecting ScopAnalysisManager objects into the calling tools.

This patch is marked WIP because the registration is incomplete. Parsing manual pipelines is fully supported, but default pass injection into the O3 pipeline is lacking, mostly because there is opportunity for some redesign here, I believe. The first point of order would be insertion points. I think it makes sense to run before the vectorizers. Running Polly Early, however, is weird. Mostly because it actually is the default (which to me is unexpected), and because Polly runs it's own O1 pipeline. Why not instead insert it at an appropriate place somewhere after simplification happend? Running after the loop optimizers seems intuitive, but it also seems wasteful, since multiple consecutive loops might well be a single scop, and we don't need to run for all of them.

My second request for comments would be regarding all those smallish helper passes we have,  like PollyViewer, PollyPrinter, PollyImportJScop. Right now these are controlled by command line options, deciding whether they should be part of the Polly pipeline. What is your opinion on treating them like real passes, and have the user write an appropriate pipeline if they want to use any of them?

Reviewers: grosser, Meinersbur, bollu

Reviewed By: grosser

Subscribers: llvm-commits, pollydev

Tags: #polly

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

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@309826 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/CodePreparation.h [new file with mode: 0644]
include/polly/ScopPass.h
include/polly/Support/ScopHelper.h
lib/Analysis/ScopPass.cpp
lib/Support/PollyPasses.def [new file with mode: 0644]
lib/Support/RegisterPasses.cpp
lib/Support/ScopHelper.cpp
lib/Transform/CodePreparation.cpp