| Issue |
74216
|
| Summary |
Add Profile-Guided Optimization (PGO) support to the Flang compiler
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
zamazan4ik
|
Similar to Clang, we need to support Profile-Guided Optimization (PGO) in Flang too. Use cases for having this optimization are completely the same as we have for Clang right now - have an ability to optimize better Fortran code based on the runtime information.
I propose adding the following PGO types for Flang:
* IR PGO (`-fprofile-generate`/`-fprofile-use` options in Clang)
* CS PGO (`fcs-profile-generate` in Clang). This option would be a good addition to IR PGO
* Sampling PGO (AutoFDO + `-fprofile-sample-use` option in Clang). Having sampling PGO support is important if we want to collect PGO profiles directly from a production environment.
I think there is no need to implement FE PGO (`-fprofile-instr-generate`/`-fprofile-instr-use` options in Clang) in Flang since IR PGO is a better option according to the [issue](https://github.com/llvm/llvm-project/issues/45668).
As a reference, the Clang PGO [docs](https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization) can be used.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs