Final-year B.Tech CSE student at IIIT Kota, working on compilers and machine learning.
I build compilers on LLVM, from language frontends to optimization passes and code generation for CPUs and GPUs, and deep learning systems for medical imaging.
- 🔧 Compilers: wrote minic, a compiler from a C-like language to native executables and GPU assembly, and a set of LLVM optimization passes
- 🧠 Machine learning: first author of a paper on multi-teacher knowledge distillation for chest X-ray diagnosis (under review)
- 🏆 Ranked 1,480 of 32,000+ teams in the Amazon ML Challenge
- 📫 chauhanaditya638@gmail.com
minic: a C-like language compiled to native code and GPU assembly
A complete compiler in C++17 on LLVM 18.
flowchart LR
A[minic source] --> B[Lexer] --> C[Parser] --> D[Sema]
D --> E[LLVM IR]
E --> F[Optimizer<br/>-O1 to -O3]
F --> G[clang + runtime] --> H[x86-64 executable]
F --> I[GPU backend] --> J[GPU assembly<br/>PTX]
style H fill:#0e75b6,stroke:#0e75b6,color:#ffffff
style J fill:#6a3fb5,stroke:#6a3fb5,color:#ffffff
- Hand-written lexer and recursive-descent parser with precedence climbing and error recovery; scoped type checker with Clang-style
file:line:coldiagnostics - LLVM IR generation: SSA through
alloca+mem2reg, short-circuit&&/||with phi nodes, guarded division that traps instead of hitting undefined behavior -O1to-O3through LLVM's new pass manager; native executables linked with clang and a small C runtime- GPU code generation: emits PTX assembly through LLVM's NVPTX backend (
--emit-ptx --gpu-arch=sm_80), optimized with the target's data layout and cost model - 44 lit/FileCheck tests, including programs run end to end at
-O0and-O2; CI with-Werror, ASan/UBSan, and clang-format
▶ See it in action
$ minic -O2 examples/collatz.mc -o collatz && ./collatz
111
$ minic --emit-ptx -O2 examples/gpu.mc -o gpu.ptx # the same language, compiled for a GPU
$ cat bad.mc
fn main() -> int {
let x: int = 1 + true;
return x;
}
$ minic bad.mc
bad.mc:2:18: error: invalid operands to binary '+' ('int' and 'bool')
let x: int = 1 + true;
^llvm-passes: out-of-tree LLVM 18 pass plugins
inst-counter: an analysis pass counting instructions by kindmy-dce: dead code elimination iterated to a fixed point, keeping stores and side-effecting callsunroll-advisor: a loop-unrolling heuristic built onLoopInfoandScalarEvolution- lit/FileCheck tests, GitHub Actions CI, and documented design decisions
First author, with Divyansh Sahu, Ayush Singh, and Dr. Veena Khandelwal (IIIT Kota). Under review.
A web application that assists clinical diagnosis with a custom-trained PyTorch model. Built with PyTorch, OpenCV, Streamlit, Supabase, and Plotly.
Ranked 1,480 of 32,000+ teams (top 5%), with an F0.5 score of 97.2%.
Compilers & systems: C++17 · C · LLVM · CMake · Ninja · lit/FileCheck · Linux Machine learning: Python · PyTorch · OpenCV · Streamlit

