[PATCH] D73837: Add minimal test for the ThinLtoJIT example

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 1 13:20:15 PST 2020


sgraenitz marked 3 inline comments as done.
sgraenitz added a comment.

I wrote this in C, compiled to LLVM IR (on macOS with a TOT clang) and removed a lot of bulk manually. Would you recommend to commit the C sources too? For now I put them here: https://github.com/weliveindetail/ThinLtoJitTests



================
Comment at: llvm/test/Examples/ThinLtoJIT/minimal.test:7
+# RUN: llvm-as %S/Inputs/sub23.ll -o sub23.bc
+# RUN: llvm-as %S/Inputs/workload.ll -o workload.bc
+# RUN: llvm-lto --thinlto -o index main.bc sub1.bc sub2.bc sub21.bc sub22.bc sub23.bc workload.bc
----------------
The input files must be assembled into .bc files, because the ThinLTO bitcode reader is not designed for human-readable .ll files.


================
Comment at: llvm/test/Examples/ThinLtoJIT/minimal.test:9
+# RUN: llvm-lto --thinlto -o index main.bc sub1.bc sub2.bc sub21.bc sub22.bc sub23.bc workload.bc
+# RUN: ThinLtoJIT -print-stats index.thinlto.bc 2>&1 | FileCheck %s
+
----------------
Passing the ThinLTO module index file as input (instead of the actual module files) is a feature.


================
Comment at: llvm/test/Examples/ThinLtoJIT/minimal.test:12
+# CHECK: Modules submitted asynchronously: {{[0-6]}}
+# CHECK: Modules submitted synchronously: {{[0-6]}}
----------------
@aprantl Did you show me the regex matchers for lit check lines last year? I cannot find the documentation for it anymore. It would be nice to grab the actual numbers here and check that their sum is `6`. Is that possible? (In 99% of cases it will be `3` and `3`, but in the end it's a timing issue and I don't want to rely on it.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73837/new/

https://reviews.llvm.org/D73837





More information about the llvm-commits mailing list