[PATCH] D63378: [ORC] WIP Speculative compilation

Praveen velliengiri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 07:46:42 PDT 2019


pree-jackie added a comment.

In D63378#1575917 <https://reviews.llvm.org/D63378#1575917>, @pree-jackie wrote:

> In D63378#1575196 <https://reviews.llvm.org/D63378#1575196>, @lhames wrote:
>
> > Hi Praveen,
> >
> > I'm not sure the IRSpeculator is necessary. My instinct would be to just have the Speculator class as the global repository of estimates of the form "execution point -> { candidates to speculatively compile }" (i.e. your GlobalSpecMap). Then the IRSpeculationLayer should take a reference to the Speculator and use a custom FunctionPass to populates the estimates.
> >
> > I've attached an example of a hand rolled pass pipeline that should give you access to statically calculated block frequency estimates: F9502527: block-freq-pass-example.cpp <https://reviews.llvm.org/F9502527>
> >
> > - Lang.
>
>
> I think it is really a matter of separation, that is where we analysis the module and retrieve the results that means whether in a layer or a speculator object, If we take over the layer approach we have to make the Pass to be  aware of speculator.


Also, we have an extra argument (JITDylib*) which cannot be passed around.. Is there any strong reason we should go with your approach?

In my point of view, we don't need to setup whole Pass Manager Pipeline, the minimalistic requirement is FunctionAnalysisManager.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63378/new/

https://reviews.llvm.org/D63378





More information about the llvm-commits mailing list