[llvm-dev] Move InlineCost.cpp out of Analysis?
Xinliang David Li via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 18 17:16:26 PDT 2016
On Mon, Apr 18, 2016 at 4:50 PM, Chandler Carruth <chandlerc at gmail.com>
wrote:
> On Mon, Apr 18, 2016 at 4:30 PM Xinliang David Li <davidxl at google.com>
> wrote:
>
>>
>>> This is not the case as of today. BPI is a dedicated analysis pass to
>>> manage branch probability profile information, but this pass is only used
>>> in limited situations (e.g, for BFI, profile update in jump-threading etc)
>>> -- using it it requires more memory as well as incremental update
>>> interfaces. Many transformation passes simply skip it and directly access
>>> the meta data in IR.
>>>
>>> Really? Which ones? I see a number of passes that know about profiling
>>> metadata so they can preserve it, or transfer it across restructuring, but
>>> nothing that really interprets it on its own in a non-trivial way.
>>>
>>
>> In a lot of cases, the client code simply set the metadata, but the user
>> clients include:
>>
>
> I want to reiterate that if this is the case, I believe these are bugs
> that we need to fix.
>
I agree with this.
> As a consequence I quickly did an audit of the places you mentioned...
>
>
>>
>> SimplifyCFG.cpp,
>>
>
> Where? I skimmed the uses, and I only found code that uses to update
> metadata, not to reason about it. If you know of something that its it
> would be really nice to point out
>
>
>> Locals.cpp,
>>
>
> I assume you mean lib/Transforms/Utils/Local.cpp? Same as above, all the
> uses look like update only.
>
>
>> CodeGenPrepare.cpp, etc.
>>
>
> Same story here -- extracted and re-applied but not analyzed.
>
> Anyways, if you do spot clients actually using metadata directly rather
> than using the analysis pass to reason about it, we should fix them to use
> the analysis passes instead.
>
yes -- I double checked and the good news is those cases I mentioned indeed
are just for updating -- this is a good relief.
>
> The scaling issues with the analysis pass were fixed really nicely BTW. I
> forget whose patch that was, but I think it was Cong?
>
>
yes.
thanks,
David
> -Chandler
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160418/cbd0b17e/attachment.html>
More information about the llvm-dev
mailing list