[llvm-dev] Move InlineCost.cpp out of Analysis?
Chandler Carruth via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 18 16:50:52 PDT 2016
On Mon, Apr 18, 2016 at 4:30 PM Xinliang David Li <davidxl at google.com>
>> 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. As a consequence I quickly did an audit of the places you
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
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.
The scaling issues with the analysis pass were fixed really nicely BTW. I
forget whose patch that was, but I think it was Cong?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev