[llvm-dev] Minimal PGO for ORC JIT
preejackie via llvm-dev
llvm-dev at lists.llvm.org
Sat Mar 30 14:31:27 PDT 2019
Hi David,
Thanks for your reply. I find that I need to add some new types of
profile data that are specific to JIT environment like Function
Ordering. Function Ordering is similar to dynamic call graph which
records the execution of functions at runtime along with the order in
which they are called.
Eg: Suppose they are 5 functions (F1..F5). F1 calls other functions in
the order described below, count tells how many times that function is
called from F1.
Start[1] --> F1 --> F2 [1]
--> F4 [1]
--> F2 [2]
--> F1 [0] (recursions)
--> F5 [1].
This shows us which function is likely going to execute next. So with
the help of multiple JIT background threads, those functions get
compiled before they are referenced. This will help in reducing JIT
compilation latencies in multi-core machines. This order must be
collected during profiling so that we can use in JIT.
I'm new to PGO, I don't know how the internals details much. As I'm
proposing this project for GSoC'19, i would like to learn how PGO is
structured, it will help to design similar for JIT & write a proposal. I
googled but is less information available about the internals. Is any
references to internals/working of PGO are welcome!
On 30/03/19 3:13 AM, Xinliang David Li wrote:
> Currently PGO is based on branch weight metadata, indirect call target
> meta data, function entry counts, and profile summary. It is
> independent of source of profile data, so most of the support is
> already there if the dynamic profiling provides the same/subset of
> information. However If you have new types of profile data that no
> existing PGO passes take advantage of, you can certainly need to
> write your own support for that.
>
> David
>
> On Fri, Mar 29, 2019 at 2:31 PM preejackie via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> Hi all,
>
> I need to do dynamic profiling in ORC JIT between the runs. Is it
> possible to re-use parts of the static pgo code in llvm for the
> purpose given that JIT uses llvm codegen. Or I need to write my
> own implementation to support profile guide optimization in JIT ?
>
> Please tell me if you want information.
>
> --
> Have a great day!
> PreeJackie
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
--
Have a great day!
PreeJackie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190331/8f8f7c46/attachment.html>
More information about the llvm-dev
mailing list