Announcement

Collapse
No announcement yet.

DragonEgg-ing Mesa & Banging It With Clang

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DragonEgg-ing Mesa & Banging It With Clang

    Phoronix: DragonEgg-ing Mesa & Banging It With Clang

    What happens if you build Mesa/Gallium3D with LLVM's Clang compiler or the LLVM DragonEgg plug-in with GCC? It has been asked before, so here is an answer.

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Originally posted by phoronix View Post
    Phoronix: DragonEgg-ing Mesa & Banging It With Clang

    What happens if you build Mesa/Gallium3D with LLVM's Clang compiler or the LLVM DragonEgg plug-in with GCC? It has been asked before, so here is an answer.

    http://www.phoronix.com/vr.php?view=16806
    The important take-away I got here is that you can build Mesa with GCC, DragonEgg, or Clang, and you'll get a working binary with any of them. The performance among the 3 is also practically identical. Sounds like switching to llvm/clang full-time is getting feasible.

    Comment


    • #3
      Testing swrast or softpipe might show larger changes

      Since llvmpipe already tries to offload most of the slow bits through LLVM at runtime to speed things up, while the other cpu renderers use more plain C code.

      Comment


      • #4
        Originally posted by smitty3268 View Post
        Since llvmpipe already tries to offload most of the slow bits through LLVM at runtime to speed things up, while the other cpu renderers use more plain C code.
        I was just about to say the same thing

        Comment


        • #5
          Lack of support for "ASM goto"

          I noticed from the screenshot that the linux kernel failed to compile because dragonegg does not support "asm goto" (asm goto is a fairly new gcc feature that allows inline assembler to change control flow, i.e. jump to other parts of the program). Dragonegg doesn't support "asm goto" because LLVM can't represent this construct yet. The Linux Makefile checks if the compiler specified by the $(CC) variable can compile "asm goto" statements, and if it only enables use of this feature if it can. The check doesn't make any use of CFLAGS or similar, so if you forced use of the dragonegg plugin by adding "-fplugin=.../dragonegg.so" to some CFLAGS like variable then the Makefile will think "asm goto" is supported (because the check only uses gcc without any flags, and gcc supports it) but the actual compilation will fail because, unlike for the check, the actual compilation will use dragonegg.

          Comment

          Working...
          X