[PATCH] D98389: [IndirectCallPromotion] Don't strip ".__uniq." suffix when it strips ".llvm." suffix.
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 12 13:55:21 PST 2021
wmi added a comment.
In D98389#2621398 <https://reviews.llvm.org/D98389#2621398>, @mstorsjo wrote:
> In D98389#2620729 <https://reviews.llvm.org/D98389#2620729>, @wmi wrote:
>
>> In D98389#2620644 <https://reviews.llvm.org/D98389#2620644>, @mstorsjo wrote:
>>
>>> FWIW, I'm seeing errors like "Malformed instrumentation profile data" when building code for a `i686-w64-mingw32` target after this commit. I've yet to reduce the actual trigger for it, but I thought I'd let you know...
>>
>> Thanks Martin for reporting the error. I think the error is thrown in the call of addFuncName(OtherFuncName) here:
>> https://github.com/llvm/llvm-project/blob/b552adf8b388a4fbdaa6fb46bdedc83fc738fc2b/llvm/lib/ProfileData/InstrProf.cpp#L376
>>
>> Could you help to get the "PGOFuncName" string before addFuncName throws the error? Then we can know what is wrong.
>
> Ok, sure. Here's a full reproducer:
>
> $ cat ../repro.c
> static void func(void) { }
> void (*funcptr)(void) = func;
> $ clang -target x86_64-linux-gnu -c ../repro.c -O2
> PGOFuncName "../repro.c:func"
> OtherFuncName ""
> Program aborted due to an unhandled Error:
> Malformed instrumentation profile data
Thanks Martin. The problem is fixed and patch recommitted at https://github.com/llvm/llvm-project/commit/ef9d7db72362b2df1237a87d5dc7dad6b0105df6
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98389/new/
https://reviews.llvm.org/D98389
More information about the llvm-commits
mailing list