[PATCH] D20078: PGO] Fix __llvm_profile_raw_version linkage in MACHO

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 13:56:03 PDT 2016


On Mon, May 9, 2016 at 1:50 PM, Rong Xu <xur at google.com> wrote:

> xur added a comment.
>
> In http://reviews.llvm.org/D20078#425034, @vsk wrote:
>
> > Wow, so without this fix are IR profiles unusable on macho? I'm not sure
> if I'm understanding this correctly because it doesn't seem like that could
> pass testing.
>
>
> Unfortunately, this is true: IR profiles is broken in MACHO for
> profile-use. We don't have an end-to-end PGO test for IR profiles. I will
> add later.
>
>
I added a test in  r268608 which broke darwin testing -- this is when the
bug was discovered.

After this is fixed, that test can be re-enabled.

David


> > Also, is "weak_def_can_be_hidden" incorrect because
> __llvm_profile_raw_version isn't supposed to be "hidden"? I'd appreciate it
> if you could point me to any resources that discuss the difference between
> weak_def_can_be_hidden and weak_definition -- if there aren't any I can dig
> a bit more :).
>
>
> Our tests show that what attribute (weak_def_can_be_hidden or
> weak_definition) to use does not seem to matter --- we just cannot mix this
> two. I chose weak_definition because it's easier to write the code in the
> profile run-time (just use __attribute__((weak)) as it's). It's harder to
> write code to generate the weak_def_can_be_hidden attribute.
>
> We thought apple has better documentation about weak_def_can_be_hidden
> because this seems to be macho specific. I only find a few references
> online. Here is one:
>
> http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20131028/193223.html
>
>
> http://reviews.llvm.org/D20078
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160509/54a2750b/attachment.html>


More information about the llvm-commits mailing list