r/Compilers • • Oct 11 '26 • Bravo 1

My LLVM contribution w/o using Ai got merged

After slowly understanding the reviewer’s suggestions and changes and going through the whole review process, my first good first issue got merged to llvm main. I’ve been trying to get one issue solved for the past couple of months and i couldn’t do it. It felt tough and scary to go through the whole gigantic code base. But feeling proud now for not quitting and backing off.

299 Upvotes

19 comments sorted by

37

u/HyperWinX Oct 11 '26

Congratulations! Thats so cool!

16

u/sirtimes Oct 11 '26

Wonderful. This is so refreshing to see someone do actual work without AI - congrats.

23

u/il_dude Oct 11 '26

Could you share tips on how to approach that giant codebase?

28

u/Kywim Oct 11 '26

Learn how to be comfortable running the tests, so get familiar with how to setup a build, running the « check-» targets and such. Also have a look at the CoC and the contribution guidelines.

Then pick an area you like and would like to contribute to. Find a start issue that has both the input (e.g. ll file + exact command) and a clear end goal (e.g. fix crash). That leaves you room to breathe to figure out all the in-between.

When stuck, use the debug output and a debugger to get unstuck, or ask on Discourse/Discord.
As long as there is a genuine will to learn, and you don’t post AI slop, people will be more than happy to help.

-18

u/c-cul Oct 11 '26

first - you need very very very expensive computer with at least 64gb of ram - for example opt in debug build has size > 3Gb and during linking with debug info it will eat whole ram

second - you need lots of spare time - re-building of whole tree (especially if you patch something in llvm ir) takes half of infinity

third - their doc lies mostly, so trust to source code only

10

u/AliceCode Oct 11 '26 edited Oct 11 '26

I built 20 different versions of LLVM on a PC with 32GB of RAM, and I'm pretty sure I never even came close to using it all.

7

u/Poseydon42 Oct 11 '26

This is wrong. I easily managed to work on LLVM on a medium spec laptop with 16 GB of RAM. The build docs specifically mention using a different linker that doesn't use up all of your RAM. Only the first build is slow (half an hour or so slow on a laptop), but normally you just rebuild and relink 1-2 files. The doc is also quite good in my opinion.

-3

u/c-cul Oct 11 '26

> doc is also quite good in my opinion

To some, even a mare is a bride: https://www.reddit.com/r/CUDA/comments/1wkietn/cuda_ptx_asm_in_llvm_ir/

1

u/kyr0x0 Oct 11 '26

Let's all shoot the messenger because reality is hard to take 😂

If everyone is quiet, there is no problem at all! Right? Right?? /s

1

u/HyperWinX Oct 12 '26

I built LLVM on 16GB of RAM multiple times.

4

u/excuse-my-lisp Oct 11 '26

Congratulations! If you've managed to get one PR all the way through then you're probably well placed to land more: one of the big issues with AI for LLVM (and other open source projects) is contributors not actually learning and getting more experience with the codebase, which is part of what makes patches from new contributors worth the reviewer effort. So, I'm sure it'll be appreciated if you're interested and able to continue!

1

u/NomaTyx Oct 28 '26

good shit :) im doing the same recently, just making some changes. what was your issue?

1

u/WillingPirate3009 24d ago

Hey man. Beginner here getting into compilers. What resources have you used so far?

1

u/ApprehensivePipe1584 Oct 13 '26

Props man, congrats!

1

u/AromaticCredit1533 Oct 13 '26

AI will be the new Python; that is, everyone has access to it, it helps you kick-start and prototype, it democratizes learning (on paper at least), but the real reward of an engineer comes when she can do without it!

2

u/nzconstructionlawyer 27d ago

There's nothing wrong with Python at all. It's not a language just for beginners just because it's easy to learn at a basic level.

-1

u/idonnowhatmynameis29 Oct 12 '26

Congratulations! I too, managed to fix a bug without using ai, but used it to generate commit message and pr description, cuz it clearly can do this better than me at this. I feel like this should be allowed to say the least :). Just my opinion