Automatic PGO - Initial implementation (1/N)
Evan Cheng
evan.cheng at apple.com
Thu Sep 26 13:04:11 PDT 2013
On Sep 26, 2013, at 4:55 AM, Diego Novillo <dnovillo at google.com> wrote:
> On Wed, Sep 25, 2013 at 8:54 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
>> Hmm. Scalar transformation seems *wrong* but you are right it can't an analysis pass. A couple of ideas:
>>
>> 1. Can we implement it not as a pass but a utility that clients can use?
>> 2. Move it to lib/Transform/Instrumentation?
>
> One hard requirement for this feature is to be enabled as a regular
> compiler option. Users are expecting this interface:
>
> $ clang -O2 -fauto-profile foo.cc -o foo
>
> (the actual name of the flag is irrelevant, of course)
>
> I am not sure what you mean by utility in the context of LLVM. Can I
> implement utilities so that the above interface works?
$ clang -O2 -fauto-profile foo.cc -o foo
What does this do? Is it annotating the IR for one source file? Or is this producing an annotated executable? If it's the former, then I see your point.
> Similarly for
> the instrumentation case. This pass does not generate instrumentation
> code, but it does generate IR metadata.
> If we want to consider that a
> form of instrumentation, and we can keep the user interface, then I
> don't really mind where it ends up in.
I don't really have a strong opinion. It just seems a bit off to call this a scalar transformation pass since that term usually means some kind of optimization pass.
Evan
>
>
> Diego.
More information about the llvm-commits
mailing list