[llvm-dev] Stop bugpoint from removing operand of metadata.

Hongbin Zheng via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 19 11:29:49 PDT 2016


On Fri, Aug 19, 2016 at 10:38 AM, Hongbin Zheng <etherzhhb at gmail.com> wrote:

>
>
> On Fri, Aug 19, 2016 at 10:32 AM, Mehdi Amini <mehdi.amini at apple.com>
> wrote:
>
>> Hi,
>>
>>
>> On Aug 19, 2016, at 10:24 AM, Hongbin Zheng via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>> Hi,
>>
>> I am trying to use bugpoint to reduce testcase. And bugpoint try to
>> reduce the number of operands for metadata, and this generate corrupted
>> metadata:
>>
>> *** Attempting to remove named metadata: Checking for crash with only
>> these named metadata nodes: llvm.dbg.cu llvm.module.flags llvm.ident:
>> <crash>
>> Checking for crash with only these named metadata nodes:
>> llvm.module.flags llvm.ident: <crash>
>> Checking for crash with only these named metadata nodes: llvm.ident:
>> Checking for crash with only these named metadata nodes:
>> llvm.module.flags: <crash>
>> Checking for crash with only 3 named metadata operands: <crash>
>> Checking for crash with only 2 named metadata operands: All
>> DICompileUnits must be listed in llvm.dbg.cu
>> LLVM ERROR: Broken module found, compilation aborted!
>>
>>
>> I had the same issue, and have some local patches to help with this.
>> Have you tried the   -disable-namedmd-remove option?
>>
> Yep, that contains too much metadata :)
>
>
>>
>> Also, at this point where bug point crashes, it should already have
>> dumped a module.
>>
> Thanks for pointing this out. let me check
>
Looks like ListReducer::reduceList do not dump module during the iteration.
The module dumped is not "new" enough for me.

Thanks
Hongbin


>
>
>>
>>>> Mehdi
>>
>>
>>
>>
>> This crash bugpoint itself. Is there away to prevent bugpoint from doing
>> this rather than changing the source code of bugpoint?
>>
>> I tried to run a "bugpoint --help-hidden" and get the following options
>> related to metadata:
>>     -lowertypetests                                        - Lower type
>> metadata
>>   -disable-namedmd-remove                                  - Do not
>> remove global named metadata
>>   -enable-import-metadata                                  - Enable
>> import metadata like 'thinlto_src_module'
>>   -enable-noalias-to-md-conversion                         - Convert
>> noalias attributes to metadata during inlining.
>>   -lto-strip-invalid-debug-info                            - Strip
>> invalid debug info metadata during LTO instead of aborting.
>>
>> And I don't think these help.
>>
>> Any suggestion?
>>
>> Thanks
>> Hongbin
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160819/bf0ead66/attachment.html>


More information about the llvm-dev mailing list