forked from llvm/llvm-www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenProjects.html
executable file
·4578 lines (3992 loc) · 217 KB
/
OpenProjects.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--#include virtual="header.incl" -->
<div class="www_sectiontitle">Open LLVM Projects</div>
<ul>
<li>Google Summer of Code Ideas & Projects
<ul>
<li>
<a href="#gsoc23">Google Summer of Code 2023</a>
<ul>
<li>
<b>LLVM Core</b>
<ul>
<li><a href="#llvm_new_jitlink_reopt">Re-optimization using JITLink</a></li>
<li><a href="#llvm_new_jitlink_backends">JITLink new backends</a></li>
<li><a href="#llvm_improving_compile_times">Improving compile times</a></li>
<li><a href="#llvm_addressing_rust_optimization_failures">Addressing Rust optimization failures</a></li>
<li><a href="#remove_ub_tests">Remove undefined behavior from tests</a></li>
<li><a href="#llvm_mlgo_latency_model">Better performance models for MLGO training</a></li>
<li><a href="#llvm_mlgo_passes_2023">Machine Learning Guided Ordering of Compiler Optimization Passes</a></li>
<li><a href="#llvm_map_value_to_src_expr">Map LLVM values to corresponding source-level expressions</a></li>
</ul>
</li>
<li><a href="http://clang.llvm.org/"><b>Clang</b></a>
<ul>
<li><a href="#clang-repl-out-of-process">Out-of-process execution for clang-repl</a>
<li><a href="#clang_analyzer_taint_analysis">Improve and Stabilize the Clang Static Analyzer's "Taint Analysis" Checks</a></li>
<li><a href="#clang-repl-autocompletion">Implement autocompletion in clang-repl</a>
<li><a href="#clang-modules-build-daemon">Modules build daemon: build system agnostic support for explicitly built modules</a></li>
<li><a href="#clang-extract-api-categories">ExtractAPI Objective-C categories</a></li>
<li><a href="#clang-extract-api-cpp-support">ExtractAPI C++ Support</a></li>
<li><a href="#clang-extract-api-while-building">ExtractAPI while building</a></li>
<li><a href="#clang-improve-diagnostics2">Improve Clang diagnostics</a></li>
<li><a href="#clang-tutorials-clang-repl">Tutorial development with clang-repl</a></li>
<li><a href="#clang-repl-wasm">Add WebAssembly Support in clang-repl</a></li>
</li>
</ul>
</li>
<li>
<b>LLD</b>
<ul>
<li><a href="#llvm_lld_embedded">LLD Linker Improvements for Embedded Targets</a></li>
</ul>
</li>
<li>
<b>MLIR</b>
<ul>
<li><a href="#llvm_mlir_presburger_opt">Optimizing MLIR’s Presburger library</a></li>
</ul>
</li>
<li>
<b>Code Coverage</b>
<ul>
<li><a href="#llvm_code_coverage">Support a hierarchical directory structure in generated coverage html reports</a></li>
<li><a href="#llvm_patch_coverage">Patch based test coverage for quick test feedback</a></li>
</ul>
</li>
<li>
<b>ClangIR</b>
<ul>
<li><a href="#clangir">Build and run SingleSource benchmarks using ClangIR</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#gsoc22">Google Summer of Code 2022</a>
<ul>
<li>
<b>LLVM Core</b>
<ul>
<li><a href="#llvm_shared_jitlink">Implement a shared-memory based JITLinkMemoryManager for out-of-process JITting</a></li>
<li><a href="#llvm_build_jit_tutorial">Modernize the LLVM "Building A JIT" tutorial series</a></li>
<li><a href="#llvm_jit_new_format">Write JITLink support for a new format/architecture</a></li>
<li><a href="#llvm_instrumentaion_for_compile_time">Instrumentation of Clang/LLVM for Compile Time</a></li>
<li><a href="#llvm_lto_dependency_info">Richer symbol dependency information for LTO</a></li>
<li><a href="#llvm_mlgo_passes">Machine Learning Guided Ordering of Compiler Optimization Passes</a></li>
<li><a href="#llvm_mlgo_loop">Learning Loop Transformation Heuristics</a></li>
<li><a href="#llvm_module_inliner">Evaluate and Expand the Module-Level Inliner</a></li>
<li><a href="#llvm_undef_load">Remove undef: move uninitialized memory to poison</a></li>
<li><a href="#llvm_abi_export">Add ABI/API export annotations to the LLVM build</a></li>
</ul>
</li>
<li><a href="http://clang.llvm.org/"><b>Clang</b></a>
<ul>
<li><a href="#clang-template-instantiation-sugar">Extend clang AST to
provide information for the type as written in template
instantiations</a>
</li>
<li><a href="#clang-sa-structured-bindings">Implement support for
C++17 structured bindings in the Clang Static Analyzer</a>
</li>
<li><a href="#clang-improve-diagnostics">Improve Clang Diagnostics</a>
</li>
</ul>
</li>
<li>
<a href="https://polly.llvm.org"><b>Polly</b></a>
<ul>
<li><a href="#polly_npm">Completely switch to new pass manager</a></li>
</ul>
</li>
<li>
<b><a href="https://enzyme.mit.edu">Enzyme</a></b>
<ul>
<li><a href="#enzyme_tblgen">Move Enzyme Instruction Transformation Rules to Tablegen</a></li>
<li><a href="#enzyme_vector">Vector Reverse-Mode Automatic Differentiation</a></li>
<li><a href="#enzyme_pm">Enable The New Pass Manager</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#gsoc21">Google Summer of Code 2021</a>
<ul>
<li>
<b>LLVM Core</b>
<ul>
<li><a href="#llvm_distributing_lit">Distributed lit testing</a></li>
<li><a href="#llvm_loop_heuristics">Learning Loop Transformation Heuristics</a></li>
<li><a href="#llvm_ir_fuzzing">Fuzzing LLVM-IR Passes</a></li>
<li><a href="#llvm_ir_assume"><tt>llvm.assume</tt> the missing pieces</a></li>
<li><a href="#llvm_shared_jitlink">Implement a shared-memory based JITLinkMemoryManager for out-of-process JITting</a></li>
<li><a href="#llvm_build_jit_tutorial">Modernize the LLVM "Building A JIT" tutorial series</a></li>
<li><a href="#llvm_jit_new_format">Write JITLink support for a new format/architecture</a></li>
<li><a href="#llvm_ir_issues">Fix fundamental issues in LLVM's IR</a></li>
<li><a href="#llvm_utilize_loopnest">Utilize LoopNest Pass</a></li>
</ul>
</li>
<li><a href="http://clang.llvm.org/"><b>Clang</b></a>
<ul>
<li><a href="#clang-template-instantiation-sugar">Extend clang AST to
provide information for the type as written in template
instantiations</a>
</li>
</ul>
</li>
<li>
<b>OpenMP</b>
<ul>
<li><a href="#openmp_gpu_jit">JIT-ing OpenMP GPU kernels transparently</a></li>
</ul>
</li>
<li>
<b>OpenACC</b>
<ul>
<li><a href="#openacc_rt_diagnostics">OpenACC Diagnostics from the OpenMP Runtime</a></li>
</ul>
</li>
<li>
<b><a href="https://polly.llvm.org">Polly</a></b>
<ul>
<li><a href="#polly_isl_bindings">Use official isl C++ bindings</a></li>
</ul>
</li>
<li>
<b><a href="https://enzyme.mit.edu">Enzyme</a></b>
<ul>
<li><a href="#enzyme_blas">Integrate custom derivatives of BLAS, Eigen, and similar routines into Enzyme</a></li>
<li><a href="#enzyme_swift">Integrate Enzyme into Swift to provide high-performance differentiation in Swift</a></li>
<li><a href="#enzyme_fixed">Differentiation of Fixed-Point Arithmetic</a></li>
<li><a href="#enzyme_rust">Integrate Enzyme into Rust to provide high-performance differentiation in Rust</a></li>
</ul>
</li>
<li>
<b>Clang Static Analyzer</b>
<ul>
<li><a href="#static_analyzer_profling">Clang Static Analyzer performance profiling</a></li>
<li><a href="#static_analyzer_constraint_solver">Clang Static Analyzer constraint solver improvements</a></li>
</ul>
</li>
<li>
<b>LLDB</b>
<ul>
<li><a href="#lldb_diagnostics">A structured approach to diagnostics in LLDB</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#gsoc20">Google Summer of Code 2020</a>
<ul>
<li>
<b>LLVM Core</b>
<ul>
<li><a href="#llvm_optimized_debugging">Improve debugging of optimized code</a></li>
<li><a href="#llvm_ipo">Improve inter-procedural analyses and optimizations</a></li>
<li><a href="#llvm_par">Improve parallelism-aware analyses and optimizations</a></li>
<li><a href="#llvm_dbg_invariant">Make LLVM passes debug info invariant</a></li>
<li><a href="#llvm_mergesim">Improve MergeFunctions to incorporate MergeSimilarFunction patches and ThinLTO Support</a></li>
<li><a href="#llvm_dwarf_yaml2obj">Add DWARF support to yaml2obj</a></li>
<li><a href="#llvm_hotcold">Improve hot cold splitting to aggressively outline small blocks</a></li>
<li><a href="#llvm_pass_order">Advanced Heuristics for Ordering Compiler Optimization Passes</a></li>
<li><a href="#llvm_ml_scc">Machine learning and compiler optimizations: using inter-procedural analysis to select optimizations</a></li>
<li><a href="#llvm_postdominators">Add PostDominatorTree in LoopStandardAnalysisResults</a></li>
<li><a href="#llvm_loopnest">Create loop nest pass</a></li>
<li><a href="#llvm_instdump">Instruction properties dumper and checker</a></li>
<li><a href="#llvm_movecode">Unify ways to move code or check if code is safe to be moved</a></li>
</ul>
<li><a href="http://clang.llvm.org/"><b>Clang</b></a>
<ul>
<li><a href="#clang-template-instantiation-sugar">Extend clang AST to
provide information for the type as written in template
instantiations</a>
</li>
<li><a href="#clang-sa-cplusplus-checkers">Find null smart pointer dereferences
with the Static Analyzer</a>
</li>
</ul>
</li>
<li><a href="http://lldb.llvm.org/"><b>LLDB</b></a></li>
<ul>
<li><a href="#lldb-autosuggestions">Support autosuggestions in LLDB's command line</a></li>
<li><a href="#lldb-more-completions">Implement the missing tab completions for LLDB's command line</a></li>
<li><a href="#lldb-reimplement-lldb-cmdline">Reimplement LLDB's command-line commands using the public SB API.</a></li>
<li><a href="#lldb-batch-testing">Add support for batch-testing to the LLDB testsuite.</a></li>
</ul>
<li>
<b>MLIR</b>
<ul>
<li>See the <a href="https://mlir.llvm.org/getting_started/openprojects/">MLIR open project list</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#gsoc19">Google Summer of Code 2019</a>
<ul>
<li>
<b>LLVM Core</b>
<ul>
<li><a href="#debuginfo_codegen_mismatch">Debug Info should have no
effect on codegen</a></li>
<li><a href="#llvm_function_attributes">Improve (function) attribute
inference</a></li>
<li><a href="#improve_binary_utilities">Improve LLVM binary utilities
</a></li>
</ul>
</li>
<li><a href="http://clang.llvm.org/"><b>Clang</b></a>
<ul>
<li><a href="#clang-astimporter-fuzzer">Implement an ASTImporter
fuzzer</a>
</li>
<li><a href="#improve-autocompletion">Improve shell autocompletion
for Clang</a>
</li>
<li><a href="#analyze-llvm">Apply the Clang Static Analyzer to LLVM-based
Projects</a>
</li>
<li><a href="#header-generation">Generate annotated sources based on
LLVM-IR analyses</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#gsoc18">Google Summer of Code 2018</a></li>
<li><a href="#gsoc17">Google Summer of Code 2017</a></li>
</ul>
</li>
<li><a href="#what">What is this?</a></li>
<li><a href="#subprojects">LLVM Subprojects: Clang and more</a></li>
<li><a href="#improving">Improving the current system</a>
<ol>
<li><a href="#target-desc">Factor out target descriptions</a></li>
<li><a href="#code-cleanups">Implementing Code Cleanup bugs</a></li>
<li><a href="#programs">Compile programs with the LLVM Compiler</a></li>
<li><a href="#llvmtest">Add programs to the llvm-test suite</a></li>
<li><a href="#benchmark">Benchmark the LLVM compiler</a></li>
<li><a href="#statistics">Benchmark Statistics and Warning System</a></li>
<li><a href="#coverage">Improving Coverage Reports</a></li>
<li><a href="#misc_imp">Miscellaneous Improvements</a></li>
</ol></li>
<li><a href="#new">Adding new capabilities to LLVM</a>
<ol>
<li><a href="#llvm_ir">Extend the LLVM intermediate representation</a></li>
<li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
<li><a href="#profileguided">Profile-Guided Optimization</a></li>
<li><a href="#compaction">Code Compaction</a></li>
<li><a href="#xforms">New Transformations and Analyses</a></li>
<li><a href="#codegen">Code Generator Improvements</a></li>
<li><a href="#misc_new">Miscellaneous Additions</a></li>
</ol></li>
<li><a href="#using">Project using LLVM</a>
<ol>
<li><a href="#machinemodulepass">Add a MachineModulePass</a></li>
<li><a href="#encodeanalysis">Encode Analysis Results in MachineInstr IR</a></li>
<li><a href="#codelayoutjit">Code Layout in the LLVM JIT</a></li>
<li><a href="#fieldlayout">Improved Structure Splitting and Field Reordering</a></li>
<li><a href="#slimmer">Finish the Slimmer Project</a></li>
</ol></li>
</ul>
<div class="doc_author">
<p>Written by the <a href="/">LLVM Team</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_sectiontitle">
<a name="gsoc23">Google Summer of Code 2023</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p>
Welcome prospective Google Summer of Code 2023 Students! This document is
your starting point to finding interesting and important projects for LLVM,
Clang, and other related sub-projects. This list of projects is not only
developed for Google Summer of Code, but open projects that really need
developers to work on and are very beneficial for the LLVM community.
</p>
<p>We encourage you to look through this list and see which projects excite
you and match well with your skill set. We also invite proposals not on this
list. More information and discussion about GSoC can be found in
<a href="https://discourse.llvm.org/c/community/gsoc" target="_blank">
discourse
</a>. If you have questions about a particular project please find the
relevant entry in discourse, check previous discussion and ask. If there is
no such entry or you would like to propose an idea please create a new
entry. Feedback from the community is a requirement for your proposal to be
considered and hopefully accepted.
</p>
<p>The LLVM project has participated in Google Summer of Code for several years
and has had some very successful projects. We hope that this year is no
different and look forward to hearing your proposals. For information on how
to submit a proposal, please visit the Google Summer of Code main
<a href="https://summerofcode.withgoogle.com/">website.</a>
</p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsection">
<a>LLVM</a>
</div>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="llvm_new_jitlink_reopt">Re-optimization using JITLink</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
In Just-In-Time compilers we often choose a low optimization level to
minimize compile time and improve launch times and latencies, however some
functions (which we call hot functions) are used very frequently and for
these functions it is worth optimizing more heavily. In general hot
functions can only be identified at runtime (different inputs will cause
different functions to become hot), so the aim of the reoptimization project
is to build infrastructure to (1) detect hot functions at runtime and (2)
compile them a second time at a higher optimization level, hence the name
"re-optimization".
<br /><br />
There are many possible approaches to both parts of this problem. E.g. hot
functions could be identified by sampling, or using existing profiling
infrastructure, or by implementing custom instrumentation. Reoptimization
could be applied to whole functions, or outlining could be used to enable
optimization of portions of functions. Re-entry into the JIT infrastructure
from JIT’d code might be implemented on top of existing lazy compilation, or
via a custom path.
<br /><br />
Whatever design is adopted, the goal is that the infrastructure should be
generic so that it can be used by other LLVM API clients, and should support
out-of-process JIT-compilation (so some of the solution will be implemented
in the ORC runtime).
<p><b>Expected result:</b>
<ul>
<li>Improve ergonomics of indirection – ideally all forms of indirection
(for re-optimization, lazy compilation, and procedure-linkage-tables)
should be able to share a single stub (and/or binary rewriting metadata)
at runtime.</li>
<li>Implement basic re-optimization on top of the tidied up
indirection.</li>
<li>(Stretch goal) Garbage-collect unoptimized code that is no longer
needed once the optimized version is available.</li>
</ul>
<p><b>Desirable skills:</b>
Intermediate C++; Understanding of LLVM and the LLVM JIT in particular.
<p><b>Project size:</b> Large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b>
<a href=https://github.com/vgvassilev>Vassil Vassilev</a>,
<a href=https://github.com/lhames>Lang Hames</a></p>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/re-optimization-using-jitlink/68260">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="llvm_new_jitlink_backends">JITLink new backends</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
JITLink is LLVM's new JIT linker API -- the low-level API that transforms
compiler output (relocatable object files) into ready-to-execute bytes in
memory. To do this JITLink’s generic linker algorithm needs to be
specialized to support the target object format (COFF, ELF, MachO), and
architecture (arm, arm64, i386, x86-64). LLVM already has mature
implementations of JITLink for MachO/arm64, MachO/x86-64, ELF/x86-64,
ELF/aarch64 and COFF/x86-64, while the implementations for ELF/riscv,
ELF/aarch32 and COFF/i386 are still relatively new.
<br />
You can either work on an entirely new architecture like PowerPC or eBPF,
or complete one of the recently added JITLink implementations. In both cases
you will likely reuse the existing generic code for one of the target object
formats. You will also work on relocation resolution, populate PLTs and GOTs
and wire up the ORC runtime for your chosen target.
<br />
<p><b>Expected result:</b>
Write a JITLink specialization for a not-yet-supported or incomplete
format/architecture such as PowerPC, AArch32 or eBPF.
<p><b>Desirable skills:</b>
Intermediate C++; Understanding of LLVM and the LLVM JIT in particular;
familiarity with your chosen format/architecture, and basic linker concepts
(e.g. sections, symbols, and relocations).
<p><b>Project size:</b> Large.</p>
<p><b>Difficulty:</b>Medium</p>
<p><b>Confirmed Mentor:</b>
<a href=https://github.com/vgvassilev>Vassil Vassilev</a>,
<a href=https://github.com/lhames>Lang Hames</a></p>
<a href=https://github.com/weliveindetail>Stefan Gränitz</a></p>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/jitlink-new-backends/68223">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="llvm_improving_compile_times">Improving compile times</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
While the primary job of a compiler is to produce fast code (good run-time
performance), it is also important that optimization doesn’t take too much
time (good compile-time performance). The goal of this project is to improve
compile-time without hurting optimization quality.
<br />
The general approach to this project is:
<ol>
<li>Pick a workload to optimize. For example, this could be a file from
<a href="https://github.com/llvm/llvm-test-suite/tree/main/CTMark">CTMark</a>
compiled in a certain build configuration (e.g. <code>-O0 -g</code> or
<code>-O3 -flto=thin</code>).</li>
<li>Collect profiling information. This could involve compiler options like
<code>-ftime-report</code> or <code>-ftime-trace</code> for a high-level
overview, as well as <code>perf record</code> or
<code>valgrind --tool=callgrind</code> for a detailed profile.</li>
<li>Identify places that are unexpectedly slow. This is heavily workload
dependent.</li>
<li>Try to optimize an identified hotspot, ideally without impacting generated
code. The <a href="https://llvm-compile-time-tracker.com/">compile-time tracker</a>
can be used to quickly evaluate impact on CTMark.</li>
</ol>
As a disclaimer, it should be noted that outside of pathological cases,
compilation doesn’t tend to have a convenient hotspot where 90% of the time
is spent, instead it is spread out across many passes. As such, individual
improvements also tend to have only small impact on overall compile-time.
Expect to do 10 improvements of 0.2% each, rather than one improvement of 2%.
</p>
<p><b>Expected result:</b>
Substantial improvements on some individual files (multiple percent), and a
small improvement on overall geomean compile-time.</p>
<p><b>Desirable skills:</b>
Intermediate C++. Familiarity with profiling tools (especially if you are
not on Linux, in which case I won’t be able to help).</p>
<p><b>Project size:</b> Either medium or large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b> <a href="https://github.com/nikic">Nikita Popov</a></p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/llvm-improving-compile-times/68094">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="llvm_addressing_rust_optimization_failures">Addressing Rust optimization failures</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
The <a href="https://www.rust-lang.org/">Rust programming language</a> uses
LLVM for code generation, and heavily relies on LLVM’s optimization
capabilities. However, there are many cases where LLVM fails to optimize
typical code patterns that are emitted by rustc. Such issues are reported
using the <a href="https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-slow">I-slow</a>
and/or <a href="https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-LLVM">A-LLVM</a> labels.
<br />
The usual approach to fixing these issues is:
<ol>
<li>Inspect the <code>--emit=llvm-ir</code> output on
<a href="https://rust.godbolt.org/">Godbolt</a>.</li></li>
<li>Create an LLVM IR test case that is not optimized when run through
<code>opt -O3</code>.</li>
<li>Identify a minimal missing transform and prove its correctness
using <a href="https://alive2.llvm.org/ce/">alive2</a>.</li>
<li>Identify which LLVM pass or passes could perform the transform.</li>
<li>Add necessary test coverage and implement the transform.</li>
<li>(Much later: Check that the issue is really resolved after the next
major LLVM version upgrade in Rust.)</li>
</ol>
The goal of this project is to address some of the less hard optimization
failures. This means that in some cases, the process would stop after step 3
or 4 without proceeding to implementation, because it’s unclear how the issue
could be addressed, or it would take a large amount of effort. Having an
analysis of the problem is still valuable in that case.
</p>
<p><b>Expected result:</b>
Fixes for a number of easy to medium Rust optimization failures. Preliminary
analysis for some failures even if no fix was implemented.</p>
<p><b>Desirable skills:</b>
Intermediate C++ for implementation. Some familiarity with LLVM (at least
ability to understand LLVM IR) for analysis. Basic Rust knowledge (enough
to read, but not write Rust).</p>
<p><b>Project size:</b> Either medium or large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b> <a href="https://github.com/nikic">Nikita Popov</a></p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/llvm-addressing-rust-optimization-failures-in-llvm/68096">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="remove_ub_tests">Remove undefined behavior from tests</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
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
<a href="https://github.com/AliveToolkit/alive2/">Alive2</a> (since it's
correct to translate a fuction that is always UB into anything).
<br />
The major steps include:
<ol>
<li>Replace known patterns such as branch on undef/poison, memory accesses
with invalid pointers, etc with non-UB patterns.</li>
<li>Use Alive2 to detect further patterns (by searching for tests that are
always UB.</li>
<li>Report any LLVM bug found by Alive2 that is exposed when removing
UB.</li>
</ol>
</p>
<p><b>Expected result:</b>
The majority of LLVM's unit tests will be free of UB.</p>
<p><b>Project size:</b> Either medium or large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b> <a href="https://web.ist.utl.pt/nuno.lopes/">Nuno Lopes</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-repl-out-of-process">Out-of-process execution for clang-repl</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
The Clang compiler is part of the LLVM compiler infrastructure and supports
various languages such as C, C++, ObjC and ObjC++. The design of LLVM and
Clang enables them to be used as libraries, and has led to the creation of
an entire compiler-assisted ecosystem of tools. The relatively friendly
codebase of Clang and advancements in the JIT infrastructure in LLVM further
enable research into different methods for processing C++ by blurring the
boundary between compile time and runtime. Challenges include incremental
compilation and fitting compile/link time optimizations into a more dynamic
environment.
<br /> <br />
Incremental compilation pipelines process code chunk-by-chunk by building an
ever-growing translation unit. Code is then lowered into the LLVM IR and
subsequently run by the LLVM JIT. Such a pipeline allows creation of
efficient interpreters. The interpreter enables interactive exploration and
makes the C++ language more user friendly. Clang-Repl is one example.
<br /> <br />
Clang-Repl uses the Orcv2 JIT infrastructure within the same process. That
design is efficient and easy to implement however it suffers from two
significant drawbacks. First, it cannot be used in devices which do not have
sufficient resources to host the entire infrastructure, such as the arduino
due (see this
<a href="https://compiler-research.org/meetings/#caas_10Mar2022">talk</a>
for more details). Second, crashes in user codes mean that the entire
process crashes, hindering overall reliability and ease of use.
<br /> <br />
This project aims to move Clang-Repl to an out-of-process execution model
in order to address both of these issues.
</p>
<p><b>Expected result:</b>
Implement an out-of-process execution of statements with Clang-Repl;
Demonstrate that Clang-Repl can support some of the ez-clang use-cases;
Research into approaches to restart/continue the session upon crash;
As a stretch goal design a versatile reliability approach for crash recovery;
</p>
<p><b>Project size:</b>Either medium or large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b>
<a href=https://github.com/vgvassilev>Vassil Vassilev</a>,
<a href=https://github.com/weliveindetail>Stefan Gränitz</a>,
<a href=https://github.com/lhames>Lang Hames</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/clang-out-of-process-execution-for-clang-repl/68225">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-repl-autocompletion">Implement autocompletion in clang-repl</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b>
The Clang compiler is part of the LLVM compiler infrastructure and supports
various languages such as C, C++, ObjC and ObjC++. The design of LLVM and
Clang enables them to be used as libraries, and has led to the creation of
an entire compiler-assisted ecosystem of tools. The relatively friendly
codebase of Clang and advancements in the JIT infrastructure in LLVM further
enable research into different methods for processing C++ by blurring the
boundary between compile time and runtime. Challenges include incremental
compilation and fitting compile/link time optimizations into a more dynamic
environment.
<br /> <br />
Incremental compilation pipelines process code chunk-by-chunk by building an
ever-growing translation unit. Code is then lowered into the LLVM IR and
subsequently run by the LLVM JIT. Such a pipeline allows creation of
efficient interpreters. The interpreter enables interactive exploration and
makes the C++ language more user friendly. The incremental compilation mode
is used by the interactive C++ interpreter, Cling, initially developed to
enable interactive high-energy physics analysis in a C++ environment.
<br /> <br />
<a href="https://compiler-research.org/">Our group</a> puts efforts to
incorporate and possibly redesign parts of Cling in Clang mainline through a
new tool, clang-repl. The project aims at the design and implementation of
robust autocompletion when users type C++ at the prompt of clang-repl.
For example:
<pre>
[clang-repl] class MyLongClassName {};
[clang-repl] My<tab>
// list of suggestions.
</pre>
</p>
<p><b>Expected result:</b>
There are several foreseen tasks:
<ul>
<li>Research the current approaches for autocompletion in clang such as
clang -code-completion-at=file:col1:col2.</li>
<li>Implement a version of the autocompletion support using the partial
translation unit infrastructure in clang’s libInterpreter.</li>
<li>Investigate the requirements for semantic autocompletion which takes
into account the exact grammar position and semantics of the code. Eg:
<pre>
[clang-repl] struct S {S* operator+(S&) { return nullptr;}};
[clang-repl] S a, b;
[clang-repl] v = a + <tab> // shows b as the only acceptable choice here.
</pre>
</li>
<li>Present the work at the relevant meetings and conferences.</li>
</p>
<p><b>Project size:</b>Large.</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentor:</b>
<a href=https://github.com/vgvassilev>Vassil Vassilev</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/clang-repl-implement-autocompletion-in-clang-repl/60364">URL</a>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-modules-build-daemon">Modules build daemon: build system agnostic support for explicitly built modules</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b> Clang currently handles modules independently in each
<code>clang</code> instance using the filesystem for synchronization of which instance builds
a given module. This has many issues with soundness and performance due to tradeoffs made for
module reuse and filesystem contention.</p>
<p>Clang has another way of building modules, explicitly built modules, that currently requires
build system changes to adopt. Here the build system determines which modules are needed, for
example by using <a href="https://github.com/llvm/llvm-project/tree/main/clang/tools/clang-scan-deps">clang-scan-deps</a>,
and ensures those modules are built before running the <code>clang</code> compile task that
needs them.</p>
<p>In order to allow adoption of this new way of building modules without major build system work
we need a module build daemon. With a small change to the command line, clang will connect to
this daemon and ask for the modules it needs. The module build daemon then either returns an
existing valid module, or builds and then returns it.</p>
<p>There is an existing open source dependency scanning daemon that is in a llvm-project fork.
This only handles file dependencies, but has an IPC mechanism. This IPC system could be used as
a base for the modules build daemon, but does need to be extended to work on Windows.</p>
<p><b>Expected result:</b> A normal project using Clang modules with an existing build system
(like Make or CMake) can be built using only explicitly built modules via a modules build
daemon.</p>
<p><b>Desirable skills:</b> Intermediate C++ programming skills; familiarity with compilers;
familiarity with Clang is an asset, but not required.</p>
<p><b>Project size:</b> 175h or 350h depending on reuse of IPC</p>
<p><b>Difficulty:</b> medium</p>
<p><b>Confirmed Mentors:</b>
<a href="https://github.com/Bigcheese">Michael Spencer</a>,
<a href="https://github.com/jansvoboda11">Jan Svoboda</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/clang-modules-build-daemon-build-system-agnostic-support-for-explicitly-built-modules/68224">URL</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-extract-api-categories">ExtractAPI Objective-C categories</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b> <a href="https://github.com/apple/swift-docc">Swift-DocC</a> is
the canonical documentation compiler for the Swift OSS project. However
Swift-DocC is not Swift specific and
uses <a href="https://github.com/apple/swift-docc-symbolkit/blob/main/openapi.yaml">SymbolKit</a>'s
languaguage agnostic JSON-based symbol graph format to understand which
symbols are available in the code, this way any language can be supported by
Swift-DocC as long as there is a symbol graph generator.</p>
<p>Clang supports symbol graph generation for C and Objective-C as described
in <a href="https://discourse.llvm.org/t/rfc-clang-support-for-api-information-generation-in-json/58845">[RFC]
clang support for API information generation in JSON</a>. Today, support for
Objective-C categories is not complete, on one hand if the category extends a
type in the current module, the category members are assumed to belong to the
extended type itself. On the other hand, if the extended type belongs to
another module the category is ignored. Nonetheless, it is common to extend
types belonging to other modules in Objective-C as part of the public API of
the module. The goal of this project is to extend the symbol graph format to
accommodate Objective-C categories and to implement support for generating
this information both through clang and through libclang.</p>
<p><b>Expected result:</b> Adding the necessary support to clang's symbol graph
generator and in libclang for describing categories of symbols defined in
other modules. This might involve additions to SymbolKit that would need to be
discussed with that community.</p>
<p><b>Desirable skills:</b> Intermediate C++ programming skills; familiarity
with clang and Objective-C are assets but not required.</p>
<p><b>Project size:</b> Medium</p>
<p><b>Difficulty:</b> Medium</p>
<p><b>Confirmed Mentors:</b>
<a href="https://github.com/daniel-grumberg">Daniel Grumberg</a>,
<a href="https://github.com/zixu-w">Zixu Wang</a>,
<a href="https://github.com/ributzka">Juergen Ributzka</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/clang-extractapi-objective-c-categories/68370">URL</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-extract-api-cpp-support">ExtractAPI C++ Support</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b> <a href="https://github.com/apple/swift-docc">Swift-DocC</a> is
the canonical documentation compiler for the Swift OSS project. However
Swift-DocC is not Swift specific and
uses <a href="https://github.com/apple/swift-docc-symbolkit/blob/main/openapi.yaml">SymbolKit</a>'s
languaguage agnostic JSON-based symbol graph format to understand which
symbols are available in the code, this way any language can be supported by
Swift-DocC as long as there is a symbol graph generator.</p>
<p>Clang supports symbol graph generation for C and Objective-C as described
in <a href="https://discourse.llvm.org/t/rfc-clang-support-for-api-information-generation-in-json/58845">[RFC]
clang support for API information generation in JSON</a>.</p>
<p>Currently the emitted symbol graph format does not support various C++
constructs such as templates and exceptions and the symbol graph generator
does not fully understand C++. This project aims to introduce support for
various C++ constructs in the symbol graph format and to implement support for
generating this data in clang.</p>
<p><b>Expected result:</b> Adding the necessary support to clang's symbol graph
generator and in libclang for describing categories of symbols defined in
other modules. This will involve additions to SymbolKit that would need to be
discussed with that community.</p>
<p><b>Desirable skills:</b> Intermediate C++ programming skills; familiarity
with clang and Objective-C are assets but not required.</p>
<p><b>Project size:</b> Large</p>
<p><b>Difficulty:</b> Medium/Hard</p>
<p><b>Confirmed Mentors:</b>
<a href="https://github.com/daniel-grumberg">Daniel Grumberg</a>,
<a href="https://github.com/zixu-w">Zixu Wang</a>,
<a href="https://github.com/ributzka">Juergen Ributzka</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/extractapi-c-support/68371">URL</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-extract-api-while-building">ExtractAPI while building</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description of the project:</b> <a href="https://github.com/apple/swift-docc">Swift-DocC</a> is
the canonical documentation compiler for the Swift OSS project. However
Swift-DocC is not Swift specific and
uses <a href="https://github.com/apple/swift-docc-symbolkit/blob/main/openapi.yaml">SymbolKit</a>'s
languaguage agnostic JSON-based symbol graph format to understand which
symbols are available in the code, this way any language can be supported by
Swift-DocC as long as there is a symbol graph generator.</p>
<p>Clang supports symbol graph generation for C and Objective-C as described
in <a href="https://discourse.llvm.org/t/rfc-clang-support-for-api-information-generation-in-json/58845">[RFC]
clang support for API information generation in JSON</a>.</p>
<p>Currently users can use clang to generate symbol graph files using
the <code>clang -extract-api</code> command line interface or generating
symbol graphs for a specific symbol using the libclang interface. This project
would entail adding a third mode that would generate the symbol graph output
as a side-effect of a regular compilation job. This can enable using the
symbol graph format as a light weight alternative to clang Index or clangd
for code intelligence services.</p>
<p><b>Expected result:</b> Enable generating symbol graph files during a
regular compilation (or module build); provide a tool to merge symbol graph
files in the same way a static linker links individual object files; Extend
clang Index to support all the information contained by symbol graph
files.</p>
<p><b>Desirable skills:</b> Intermediate C++ programming skills; familiarity
with clang and Objective-C are assets but not required.</p>
<p><b>Project size:</b> Medium</p>
<p><b>Difficulty:</b> Medium/Hard</p>
<p><b>Confirmed Mentors:</b>
<a href="https://github.com/daniel-grumberg">Daniel Grumberg</a>,
<a href="https://github.com/zixu-w">Zixu Wang</a>,
<a href="https://github.com/ributzka">Juergen Ributzka</a>
</p>
<p><b>Discourse:</b> <a href="https://discourse.llvm.org/t/clang-extractapi-while-building/68372">URL</a></p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-improve-diagnostics2">Improve Clang diagnostics</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description:</b>
The diagnostics clang emits are ultimately its interface to the developer. While the diagnostics are generally good, there are some rough edges that need to be ironed out. Some cases can be improved by special-casing them in the compiler as well.
</p>
<p>
As one can see from Clang’s issue tracker, there are <a href="https://github.com/llvm/llvm-project/issues?page=2&q=is%3Aopen+is%3Aissue+label%3Aclang%3Adiagnostics">lots of issues</a> open against clang’s diagnostics.
</p>
<p>
This project does not aim to implement one big feature but instead focuses on smaller, incremental improvements to Clang’s diagnostics.
</p>
<p>
Possible example issues to resolve:
<ul>
<li><a href="https://github.com/llvm/llvm-project/issues/59872">Calling nullptr function pointer in a constexpr function results in poor diagnostic</a></li>
<li><a href="https://github.com/llvm/llvm-project/issues/58601">Print name of uninitialized subobject (instead of type)</a></li>
<li><a href="https://github.com/llvm/llvm-project/issues/57906">https://github.com/llvm/llvm-project/issues/57906</a></li>
<li><a href="https://github.com/llvm/llvm-project/issues/57337">clang(++) unhelpful frame-larger-than warning, very small stack frame exceeding very large limit</a></li>
<li>Any other diagnostics issue you find interesting or ran into personally.</li>
</ul>
</p>
<p><b>Expected outcomes</b>:
At least three fixed smaller diagnostics issues, or one larger implemented diagnostics improvement.
</p>
<p><b>Confirmed Mentor:</b><a href=https://github.com/tbaederr>Timm Bäder</a>
<p><b>Desirable skills:</b>
<ul>
<li>Intermediate C++ knowledge.</li>
<li>Preferably experience in the Clang code base, since the issues mentioned can have their root cause in various parts of it.</li>
<li>Preferably an already working local LLVM build</li>
</ul>
</p>
<p><b>Project type:</b> Medium/200 hr</p>
<p><b>Discourse</b>
<a href="https://discourse.llvm.org/t/improve-clang-diagnostics-2/68900/3">URL</a>
</p>
</div>
<!-- *********************************************************************** -->
<div class="www_subsubsection">
<a name="clang-tutorials-clang-repl">Tutorial development with clang-repl</a>
</div>
<!-- *********************************************************************** -->
<div class="www_text">
<p><b>Description:</b>
The Clang compiler is part of the LLVM compiler infrastructure and supports
various languages such as C, C++, ObjC and ObjC++. The design of LLVM and
Clang enables them to be used as libraries, and has led to the creation of
an entire compiler-assisted ecosystem of tools. The relatively friendly
codebase of Clang and advancements in the JIT infrastructure in LLVM further
enable research into different methods for processing C++ by blurring the
boundary between compile time and runtime. Challenges include incremental
compilation and fitting compile/link time optimizations into a more dynamic
environment.
</p>
<p>
Incremental compilation pipelines process code chunk-by-chunk by building an
ever-growing translation unit. Code is then lowered into the LLVM IR and
subsequently run by the LLVM JIT. Such a pipeline allows creation of
efficient interpreters. The interpreter enables interactive exploration and
makes the C++ language more user friendly. The incremental compilation mode
is used by the interactive C++ interpreter, Cling, initially developed to
enable interactive high-energy physics analysis in a C++ environment.
</p>
<p>
We invest efforts to incorporate and possibly redesign parts of Cling in
Clang mainline through a new tool, clang-repl. The project aims implementing
tutorials demonstrating the capabilities of the project and investigating
adoption of clang-repl in xeus-clang-repl prototype allowing to write C++
in Jupyter.
</p>
<p><b>Expected result:</b>
There are several foreseen tasks:
<ul>
<li>Write several tutorials demostrating the current capabilities of
clang-repl.</li>
<li>Investigate the requirements for adding clang-repl as a backend to
xeus-cling.</li>
<li>Improve the xeus kernel protocol for clang-repl.</li>
<li>Prepare a blog post about clang-repl and possibly Jupyter.
Present the work at the relevant meetings and conferences.</li>
</p>
<p><b>Confirmed Mentor:</b>
<a href="https://github.com/vgvassilev">Vassil Vassilev</a>
<a href="https://github.com/davidlange6">David Lange</a>
<p><b>Desirable skills:</b>
Intermediate C++; Understanding of Clang and the Clang API in particular
</p>
<p><b>Project type:</b> Medium</p>
<p><b>Discourse</b>
<a href="https://discourse.llvm.org/t/clang-repl-tutorial-development-with-clang-repl/60365">URL</a>
</p>
</div>