Hey Sarthak,
I’m not very knowledgeable about LLVM middle-end/back-end, but I hope I can help.
First of all, you can follow the LLVM tutorial for building a language frontend with LLVM. This will allow you to get to know the LLVM codebase and LLVM IR a bit better.
Then, there is a nice project by @banach-space called llvm-tutor. This is a collection of out-of-tree LLVM passes that can be dynamically loaded into clang, for example. It’s very cool because you can extend a compiler’s middle-end pipeline without rebuilding it. You can try to implement such passes yourself, like some obfuscation passes or analysis passes.
Also, you can look for good first issues on the GitHub Issues page. This way, you can contribute to LLVM by tackling small tasks. These tasks might not be directly related to LLVM optimizations, but they will give you a nice exposure to LLVM code and the contribution process.
Then, there is also a huge project called MLIR, which has some tutorials as well. You can try using it and contributing to it too. MLIR is rapidly evolving and is used by many companies.
Please check out this link for more beginner resources.
My advice would be to pick a project that can use LLVM, as shown in the tutorials, and start building it. This, I guess, is the most fun and the best way to learn LLVM or any other skills for that matter.
I hope this helps you learn more about LLVM, and good luck!