Passes after Polly | How are Passes sequenced without the PassRegistry ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Passes after Polly | How are Passes sequenced without the PassRegistry ?

Robinson, Paul via cfe-dev
Hello,

I was trying to find out what passes are sequenced after Polly in clang. I need to know this since I'm seeing a difference between the files kernel-before.ll and kernel.ll generated by the command clang -g -O3 -mllvm -polly -mllvm -polly-dump-before -S -emit-llvm, where kernel-before.ll is the file received by Polly.

I assumed that the clang driver registers the Passes just like opt or Julia does by calling polly::registerPollyPasses ( in the <polly_src>/lib/Support/RegisterPasses.cpp ). But, it was a surprise to not find a call to registerPollyPasses inside clang.

Summarising,
  • How is Polly called from Clang ?
  • What are the Passes sequenced after Polly ?
Thanks,
Sanjay

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passes after Polly | How are Passes sequenced without the PassRegistry ?

Robinson, Paul via cfe-dev
The PassManagerBuilder that constructs the -O pipelines offers multiple ExtensionPoints at which optimizer plugins can insert themselves into optimizer pipelines.

Here's how plugins can do this:
http://llvm.org/doxygen/structllvm_1_1RegisterStandardPasses.html

In Polly, you can find the registration part a bit further down in the file you linked: https://github.com/llvm-mirror/polly/blob/master/lib/Support/RegisterPasses.cpp#L417

Cheers,
Philip

2017-05-12 14:20 GMT+02:00 SANJAY SRIVALLABH SINGAPURAM <[hidden email]>:
Hello,

I was trying to find out what passes are sequenced after Polly in clang. I need to know this since I'm seeing a difference between the files kernel-before.ll and kernel.ll generated by the command clang -g -O3 -mllvm -polly -mllvm -polly-dump-before -S -emit-llvm, where kernel-before.ll is the file received by Polly.

I assumed that the clang driver registers the Passes just like opt or Julia does by calling polly::registerPollyPasses ( in the <polly_src>/lib/Support/RegisterPasses.cpp ). But, it was a surprise to not find a call to registerPollyPasses inside clang.

Summarising,
  • How is Polly called from Clang ?
  • What are the Passes sequenced after Polly ?
Thanks,
Sanjay

--
You received this message because you are subscribed to the Google Groups "Polly Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passes after Polly | How are Passes sequenced without the PassRegistry ?

Robinson, Paul via cfe-dev
In reply to this post by Robinson, Paul via cfe-dev
2017-05-12 14:20 GMT+02:00 SANJAY SRIVALLABH SINGAPURAM
<[hidden email]>:
> How is Polly called from Clang ?

Polly registers itself to the PassBuilderBuilder using
llvm::RegisterStandardPasses. clang will then call
PassManagerBuilder::populateModulePassManager and get a PassManager
with Polly in it.

> What are the Passes sequenced after Polly ?

If you look into the source of
PassManagerBuilder::populateModulePassManager, you can see where Polly
is added. There are multiple positions possible (addExtensionsToPM),
determined by the -polly-position= switch.

Michael

--
Tardyzentrismus verboten!
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passes after Polly | How are Passes sequenced without the PassRegistry ?

Robinson, Paul via cfe-dev
Thanks for the information !!

On Fri, May 12, 2017 at 5:59 PM Michael Kruse <[hidden email]> wrote:
2017-05-12 14:20 GMT+02:00 SANJAY SRIVALLABH SINGAPURAM
<[hidden email]>:
> How is Polly called from Clang ?

Polly registers itself to the PassBuilderBuilder using
llvm::RegisterStandardPasses. clang will then call
PassManagerBuilder::populateModulePassManager and get a PassManager
with Polly in it.

> What are the Passes sequenced after Polly ?

If you look into the source of
PassManagerBuilder::populateModulePassManager, you can see where Polly
is added. There are multiple positions possible (addExtensionsToPM),
determined by the -polly-position= switch.

Michael

--
Tardyzentrismus verboten!

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...