[llvm-bugs] [Bug 30610] New: Module-level inline assembly ThinLTO failures

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 4 09:47:09 PDT 2016


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

            Bug ID: 30610
           Summary: Module-level inline assembly ThinLTO failures
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: tejohnson at google.com
                CC: jbc.engelen at gmail.com, llvm-bugs at lists.llvm.org,
                    mehdi.amini at apple.com, peter at pcc.me.uk,
                    tejohnson at google.com
    Classification: Unclassified

As reported by Johan here:
   http://lists.llvm.org/pipermail/llvm-dev/2016-October/105526.html

when we import from a module containing module-level inline assembly, the
IRLinker will concatenate any module level inline assembly from the module we
are importing from (IRLinker::run). This is correct for full LTO, but not for
ThinLTO.

I have a patch to disable this when IR linking due to ThinLTO importing.

However, if the module-level inline assembly contains a def of a referenced
local symbol, this actually causes things to stop working because we don't pull
in the definition.

I also see issues with module-level inline assembly defining local symbols and
full LTO compilation: if two modules define the local symbols with the same
name, no renaming is performed and there are duplicate symbols.

This is similar to issues I found with LTO and inline assembly:
   http://lists.llvm.org/pipermail/llvm-dev/2016-April/098047.html
which will fail with full LTO but I am working around with ThinLTO by
preventing generation of a module summary index.

Couple possibilities:
1) Use my patch to prevent concatenation of these strings when importing, which
solves the global symbol def issue originally reported
2) Use the same workaround for ThinLTO when module level inline assembly
defines referenced local symbols (prevent generation of module summary to avoid
importing)

-- 
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/20161004/547c7814/attachment.html>


More information about the llvm-bugs mailing list