|
| 1 | +gsoc_projects: |
| 2 | + - title: "Remove undefined behavior from tests" |
| 3 | + description: | |
| 4 | + Many of LLVM's unit tests have been reduced automatically from larger tests. Previous-generation reduction tools used undef and poison as placeholders everywhere, as well as introduced undefined behavior (UB). Tests with UB are not desirable because 1) they are fragile since in the future the compiler may start optimizing more aggressively and break the test, and 2) it breaks translation validation tools such as Alive2 (since it's correct to translate a function that is always UB into anything). |
| 5 | + The major steps include: |
| 6 | +
|
| 7 | + 1. Replace known patterns such as branch on undef/poison, memory accesses with invalid pointers, etc with non-UB patterns. |
| 8 | + 2. Use Alive2 to detect further patterns (by searching for tests that are always UB). |
| 9 | + 3. Report any LLVM bug found by Alive2 that is exposed when removing UB. |
| 10 | + expected_result: "The majority of LLVM's unit tests will be free of UB." |
| 11 | + skills: "Experience with scripting (Python or PHP) is required. Experience with regular expressions is encouraged." |
| 12 | + project_size: "Either medium or large." |
| 13 | + difficulty: "Medium" |
| 14 | + mentors: |
| 15 | + - name: "Nuno Lopes" |
| 16 | + url: "https://web.ist.utl.pt/nuno.lopes/" |
| 17 | + discourse_url: "https://discourse.llvm.org/t/gsoc-2004-remove-undefined-behavior-from-tests/77236" |
| 18 | + - title: "Automatically generate TableGen file for SPIR-V instruction set" |
| 19 | + description: | |
| 20 | + The existing file that describes the SPIR-V instruction set in |
| 21 | + LLVM was manually created and is not always complete or up to date. Whenever |
| 22 | + new instructions need to be added to the SPIR-V backend, the file must be |
| 23 | + amended. In addition, since it is not created in a systematic way, there are |
| 24 | + often slight discrepancies between how an instruction is described in the |
| 25 | + SPIR-V spec and how it is declared in the TableGen file. Since SPIR-V |
| 26 | + backend developers often use the spec as a reference when developing new |
| 27 | + features, having a consistent mapping between the specification and TableGen |
| 28 | + records will ease development. |
| 29 | + |
| 30 | + This project proposes creating a script |
| 31 | + capable of generating a complete TableGen file that describes the SPIR-V |
| 32 | + instruction set given the JSON grammar available in the |
| 33 | + KhronosGroup/SPIRV-Headers repository, and updating SPIR-V backend code to |
| 34 | + use the new definitions. The specific method used for translating the JSON |
| 35 | + grammar to TableGen is left up to the discretion of the applicant, however, |
| 36 | + it should be checked into the LLVM repository with well-documented |
| 37 | + instructions to replicate the translation process so that future maintainers |
| 38 | + will be able to regenerate the file when the grammar changes. Note that the |
| 39 | + grammar itself should remain out-of-tree in its existing separate |
| 40 | + repository. |
| 41 | + expected_result: | |
| 42 | + The SPIR-V instruction set's definition in TableGen is replaced with one that is autogenerated. |
| 43 | + A script and documentation are written that support regenerating the definitions as needed given the JSON grammar of the SPIR-V instruction set. |
| 44 | + Usage of the SPIR-V instruction set in the SPIR-V backend updated to use the new autogenerated definitions. |
| 45 | + skills: "Experience with scripting and an intermediate knowledge of C++. Previous experience with LLVM/TableGen is a bonus but not required." |
| 46 | + project_size: "Medium (175 hour)" |
| 47 | + mentors: |
| 48 | + - name: "Natalie Chouinard" |
| 49 | + url: "https://github.com/sudonatalie/" |
| 50 | + - name: "Nathan Gauër" |
| 51 | + url: "https://github.com/keenuts/" |
| 52 | + discourse_url: "https://discourse.llvm.org/t/clang-automatically-generate-tablegen-file-for-spir-v-instruction-set/76369" |
0 commit comments