[PATCH] D28411: [ThinLTO] Handle conflicting local names gracefully

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 13:14:27 PST 2017


tejohnson created this revision.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.

r285871 introduced an assert that was overly aggressive in the case
of a same-named local in different same-named files (in different
directories), where the source name and therefore the GUID ended up
the same because the files were compiled in their own directory without
any leading path. Change the handling in the promotion logic to get
the summary for the version in that module.

This also exposed an issue where we are not always importing the
right copy, which is a performance not correctness issue (because
the renaming is based on the module hash which must be different,
see the bug report for details). I will fix that as a follow-on.

Fixes PR31561.


https://reviews.llvm.org/D28411

Files:
  lib/Transforms/Utils/FunctionImportUtils.cpp
  test/ThinLTO/X86/Inputs/local_name_conflict1.ll
  test/ThinLTO/X86/Inputs/local_name_conflict2.ll
  test/ThinLTO/X86/local_name_conflict.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28411.83413.patch
Type: text/x-patch
Size: 4110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/ceefe81a/attachment.bin>


More information about the llvm-commits mailing list