[llvm-dev] PGO optimization using llvm

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] PGO optimization using llvm

Teresa Johnson via llvm-dev

Hi,

 

We are using clang based compiler for our android build system.

We plan to enable the PGO (profile guided optimization ) for some of our android modules

 

I would like to have some understanding on the way that the PGO profiles are being used by the clang compiler.

As I understand Profile guidance enables the compiler to make better optimization decisions by using knowledge about how the program actually runs.

With this profile information, the compiler can do a better job of inlining functions, ordering basic blocks, allocating registers, and so on.

 

So I would like to know if the clang based compiler in android will use these profiles for making better decisions on inlining or register allocations ?

 

But when I went through the clang documentation, right now the pgo profiles can be used for block reordering but could not find reference as to whether it helps the compiler

to take any other optimized decision .

https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization

 

Can you please help me to get this information if it’s something that clang has yet to support with regards to PGO generated profiles.

 

Best Regards

Priyanka


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] PGO optimization using llvm

Teresa Johnson via llvm-dev


On Sat, Apr 27, 2019 at 9:24 AM Priyanka Bose via llvm-dev <[hidden email]> wrote:

Hi,

 

We are using clang based compiler for our android build system.

We plan to enable the PGO (profile guided optimization ) for some of our android modules

 

I would like to have some understanding on the way that the PGO profiles are being used by the clang compiler.

As I understand Profile guidance enables the compiler to make better optimization decisions by using knowledge about how the program actually runs.

With this profile information, the compiler can do a better job of inlining functions, ordering basic blocks, allocating registers, and so on.

 

So I would like to know if the clang based compiler in android will use these profiles for making better decisions on inlining or register allocations ?


Not sure on the register allocation, but definitely yes for inlining. It is also used for a slew of other optimizations (e.g. value profiling based indirect call promotion and memcpy optimization, partial inlining, function layout, and misc other places.

Teresa

 

But when I went through the clang documentation, right now the pgo profiles can be used for block reordering but could not find reference as to whether it helps the compiler

to take any other optimized decision .

https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization

 

Can you please help me to get this information if it’s something that clang has yet to support with regards to PGO generated profiles.

 

Best Regards

Priyanka

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


--
Teresa Johnson | Software Engineer | [hidden email] |

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev