[llvm-bugs] [Bug 27867] New: PGO data for "static" functions invalidated if different build directories are used.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 24 16:19:19 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27867

            Bug ID: 27867
           Summary: PGO data for "static" functions invalidated if
                    different build directories are used.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Miscellaneous Instrumentation passes
          Assignee: unassignedbugs at nondot.org
          Reporter: chisophugis at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

As I mentioned in the "The state of IRPGO (3 remaining work items)" thread on
llvm-dev, currently we mangle the filename into the counters of static
functions, which is not robust against changes in build directory.

One solution would be to mangle a hash of the function into the counter name
(or something like that). My main concern is IRPGO, but FEPGO probably has
similar issues.


For reference, here is the relevant part of that post:
1. The main concerning one is that getPGOFuncName mangles the filename into the
counter name. This causes us to get instrprof_error::unknown_function when the
pgo-use build is done in a different build directory from the training build
(which is a reasonable thing to support). In this situation, PGO data is
useless for all `static` functions (and as a byproduct results in a huge volume
of warnings).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160524/22acbe32/attachment.html>


More information about the llvm-bugs mailing list