llir / llvm

Library for interacting with LLVM IR in pure Go.
https://llir.github.io/document/
BSD Zero Clause License
1.19k stars 78 forks source link

testdata: replace WLLVM with GLLVM #139

Closed mewmew closed 4 years ago

mewmew commented 4 years ago

To generate whole program LLVM bitcode for the Coreutils and SQLite test cases, we have been relying on WLLVM. WLLVM has done a tremendous job at wrapping Clang to enable such build configurations where can use an unmodified version of the configure scripts and Makefiles of both Coreutils and SQLite to produce whole LLVM bitcode along-side of the binary executables that these Makefiles would normally generate.

A recent development is the GLLVM which is a drop-in replacement for WLLVM with efforts to improve parallel compilation speed.

This issue tracks the evaluation of GLLVM and possible replacement of WLLVM with this drop-in replacement.

mewmew commented 4 years ago

Note, while doing this work, we will also take the opportunity to re-create the Coreutils and SQLite test cases using Clang 10.0. The reason for this is that Clang has changed its default output quite considerably in the last few releases (9.0 and 10.0), to become more explicit with outputting names of local IDs and label IDs of unnamed local variables and basic blocks. As this effects almost every line of the test cases, it makes most sense to just re-generate the entire test case suite for both Coreutils and SQLite using Clang 10.0. And while doing so, we will also evaluate the use of GLLVM for whole program LLVM bitcode generation.

Edit: also, while doing this, we may look into updating to the latest versions of Coreutils and SQLite (not that it really matters for the test cases, as we are only interested in the LLVM IR output, but why not).