[llvm-bugs] [Bug 39241] New: ThinLTO seems to break computed goto

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 10 03:15:17 PDT 2018


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

            Bug ID: 39241
           Summary: ThinLTO seems to break computed goto
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mh+llvm at glandium.org
                CC: eleviant at accesssoftek.com, llvm-bugs at lists.llvm.org

STR:
 git clone https://github.com/silnrsi/graphite
 cd graphite
 mkdir build
 cd build
 cmake -GNinja -DCMAKE_C_COMPILER=/path/to/bin/clang
-DCMAKE_CXX_COMPILER=/path/to/bin/clang++ -DCMAKE_CXX_FLAGS=-flto=thin
-DCMAKE_SHARED_LINKER_FLAGS=-flto=thin -DCMAKE_EXE_LINKER_FLAGS=-flto=thin
-DCMAKE_MODULE_LINKER_FLAGS=-flto=thin -DCMAKE_C_FLAGS=-flto=thin
-DCMAKE_AR=/path/to/bin/llvm-ar -DCMAKE_RANLIB=/path/to/bin/llvm-ranlib ..
 ninja
 ninja test

This results in many tests failing (84 out of 93 on my machine). A non-LTO
build only fails only 8 tests on my machine.

This worked fine with clang 6, so I bisected it down to:

commit 11b0e47b5b79bab22d27b6b2952b1f7582848063 (refs/bisect/bad)
Author: Eugene Leviant <eleviant at accesssoftek.com>
Date:   Fri Feb 16 08:11:04 2018 +0000

    [ThinLTO] Import global variables

    Differential revision: https://reviews.llvm.org/D43077


    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325320
91177308-0d34-0410-b5e6-96231b3b80d8

I haven't dug into how exactly the generated code is broken, but adding the
following to the cmake command line makes it work: -DGRAPHITE2_VM_TYPE=call
That makes call_machine.cpp be used instead of direct_machine.cpp. The main
difference between both is that the latter is using computed gotos.

-- 
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/20181010/b43854cf/attachment.html>


More information about the llvm-bugs mailing list