[llvm-dev] Adding a new External Suite to test-suite

Bruno Conde Kind via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 6 02:25:02 PDT 2020


Greetings LLVMers,

I would like to add the licensed part of AnghaBench
(http://cuda.dcc.ufmg.br/angha/) as an External Test in the LLVM
test-suite. We have 128,411 files with their original licenses.
(http://www.dcc.ufmg.br/~fernando/coisas/c_files_with_licenses.tar.gz)
Each file is a single function, that compiles as is---no dependencies are
needed. For instance, the commands below work for each individual
file:

$ clang $compile_flags -Xclang -disable-O0-optnone -S -c -emit-llvm \
    "$file" -o "$individual_bc"
$ opt -mem2reg -O0 ${user_passes[@]} -instcount -stats -S \
    "$individual_bc" -disable-output 2>&1"

So, these are my questions:

Q1: What do I have to do to start integrating my collection of .c files as
an
External Suite? They are all single source, single function,
compilable headerless files extracted from open source repositories.
They are grouped in folders, in a similar way the original project
was.

Q2: I read that using glob might not be a good idea, even though there is a
partial workaround. However, when trying to understand what the other
External
suites were doing, I noticed several of them were using it.
May I ignore the note at
https://cmake.org/cmake/help/latest/command/file.html#glob ?

Q3: The C files were not extracted/reconstructed with execution in mind.
For now, we're mainly interested in collecting stats and testing the
compiler. Since we don't generate executables, should I call cmake's
add_library() for each .c file?

Kind regards,
Bruno Kind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200406/0c5478bb/attachment.html>


More information about the llvm-dev mailing list