How We Won Hackman V8: Building IRis, an ML-Powered Compiler Optimization System

The Beginning: Late Arrivals and Sleep-Deprived Ambitions
My teammates Shubhang Sinha, Yash Suthar, and I, Inchara J, walked into the Hackman V8 venue fashionably late - almost everyone had already started coding. We were already running on fumes, having spent the previous night brainstorming with our dear alumni senior, Maaz Karim bhaiya. Despite the exhaustion, I came with cautious optimism: making it to the finals would be amazing.
Honestly, I wasn't sure our idea would stand a chance. We were building something research-oriented in the compilers domain - a field that often gets overshadowed by flashier, industry-focused innovations at hackathons. But we believed in the problem we were solving.
The Idea: IRis - Smarter Compiler Optimization with ML
Our project, IRis, tackles a fundamental problem in computer systems: compiler optimization. Traditional compilers use one-size-fits-all optimization levels like -O2 or -O3, but what if we could predict the best optimization strategy for each specific program?
We built an ML-powered compiler optimization system using Transformers to predict optimal LLVM pass sequences for C programs, specifically targeting RISC-V hardware. The goal? Beat standard optimization levels with intelligent, program-specific optimizations.
The Technical Challenge
Here's what we had to accomplish:
- Training Data Generation: Compile 235 programs to RISC-V, try 600 different pass sequences per program, measure execution time and binary size, and extract features from LLVM IR.
- Model Architecture: Train Transformer models to learn the relationship:
program_features → best_pass_sequence. The model needed to understand which optimization passes work best for different types of programs. - Dual Optimization: Optimize for both execution time and binary size, two metrics that often conflict with each other.
The Grind: 12 PM to 12 AM, Just Building the Dataset
We started at noon on October 31st, and let me tell you—building the dataset was no joke. It took us 12 solid hours just to finalize a dataset for our model and code the initial architecture.
We had to:
- Set up LLVM/Clang with RISC-V support
- Configure QEMU for RISC-V emulation
- Write feature extraction code to analyze different characteristics from LLVM IR (instruction counts, memory operations, cyclomatic complexity, etc.)
- Implement a pass sequence generator with multiple strategies (random, mixed, genetic algorithm)
- Create a pipeline to compile programs, measure performance, and collect data
Our experimentation phase didn't begin until midnight. By then, most teams were already deep into their demos.
The Nightmare: 12 AM to 4 AM
The night that followed was the most hectic I've ever experienced at a hackathon.
The model was ready, but then we realized we needed a major architectural change. We had initially trained to predict only the pass sequence, but we pivoted to joint training for both sequences AND metrics. This meant:
- Restructuring our model to output multiple targets
- Managing the machine-level configurations (RISC-V ABIs: lp64, lp64f, lp64d)
Everything broke. Scaling errors. Wrong labeling. We forgot to smoothen the labels. The training code was a mess.
By 4 AM, we had lost hope. But we didn't leave. We resorted to what I like to call "vibe coding" - that desperate state where you just keep trying things until something works.
The Evaluation: Requesting Extra Time
When our evaluator, Ashutosh bhaiya, arrived, we requested extra time. We'd finally gotten the model training to complete, but now we faced another crisis: integrating the model with the backend of our demo website.
The stress was real. We even considered hardcoding the results, but that would've been dishonest and could've disqualified us. So we kept debugging, frantically searching for the integration error.
Then we found it. Everything clicked into place.
The Feedback That Changed Everything
Ashutosh Pandey bhaiya gave us a crucial heads-up. He loved the technical depth but pointed out we needed:
- More real-life examples showing why this project matters
- Two separate models: one optimized for binary size, another for execution time
We took his feedback seriously and got to work, hoping we'd at least make it to the finals.
Against the clock, we:
- Implemented the dual-model architecture
- Trained separate Transformer models for each optimization goal
- Integrated both models into the demo
- Created evaluation scripts to demonstrate our improvements
The technical implementation involved:
Model Pipeline:
1. Extract features from C program
2. Pass features to both models
3. Model 1 predicts optimal pass sequence for speed
4. Model 2 predicts optimal pass sequence for size
5. Execute predictions and measure performance
The Presentation: Adrenaline Over Pain
Presentation time arrived. My legs were killing me - severe aches from sitting and coding for nearly 24 hours straight. But adrenaline is a powerful thing. I stood up, spoke confidently about how IRis uses:
- Transformer models for joint training to predict both sequences and performance metrics
- Feature extraction from LLVM IR including instruction counts, memory intensity, cyclomatic complexity
- Hybrid sequence generation combining LLVM optimization passes with RISC-V machine-level flags
- Dual-model architecture for optimizing both execution time and binary size
We finished the presentation smoothly. Now came the wait.
The Highlight: Halloween Pushups
Before the results, there was a lighthearted moment that broke the tension. It was Halloween, and the organizers had us play a game passing around a pumpkin while music played.
The pumpkin landed on me. Our entire team had to do pushups. After hours of coding, our arms were jelly, but we laughed through it. It was exactly the kind of break we needed on such a stressful day.
The Victory: First Place
Then came the results.
We won first place.
We were absolutely shocked. We'd beaten teams with far more experience, including our fourth-year seniors. This was the first time any Point Blank team had won first place in Hackman.
The feeling was surreal. Our research-oriented compiler project, the one I thought wouldn't stand a chance against industry-focused innovations had won.
What We Built: Technical Deep Dive
Let me break down what IRis actually does:
Architecture
- 235 programs total with an 80:20 train-test split
- 600 pass sequences per program for comprehensive training data
- Feature extraction: Analyzes LLVM IR to extract characteristics like:
- Total instruction count
- Number of load/store operations
- Cyclomatic complexity
- Memory intensity
- Control flow patterns
- Pass sequence generation: Creates optimization sequences using:
- Random strategy
- Mixed strategy (random + synergy-based)
- Genetic algorithms
- Hybrid approach with machine-level flags
- Machine-level optimization: RISC-V specific configurations:
- ABI variants (lp64, lp64f, lp64d)
- ISA extensions (M, A, F, D, C)
- Landing Page:

- Demo Page:

- Comparison Pages:


Tech Stack
- ML Framework: Transformers for both regression and best sequence prediction (joint training)
- Compiler Infrastructure: LLVM/Clang with RISC-V backend
- Emulation: QEMU for RISC-V
- Languages: Python for ML pipeline, C for test programs
Reflections: What Made Us Win
Looking back, several factors contributed to our success:
- Responding to feedback: We didn't just listen to Ashutosh bhaiya's suggestions - we implemented them
- Not giving up at 4 AM: When everything broke, we could've quit, but we kept going
- Technical depth: We didn't just build a working demo - we built something with real research value
Gratitude
I'm incredibly grateful to my teammates, Shubhang and Yash, for pushing through that brutal night. To Maaz Karim bhaiya for the brainstorming session that set us on the right path. To Ashutosh bhaiya for the feedback that elevated our project. And to everyone who believed in a "boring" compilers project at a hackathon.
This win proved that research-oriented projects can compete with and beat industry-focused ones. Sometimes, the most impactful innovations come from solving fundamental problems in new ways.
Check out our project on GitHub: IRis - ML-Powered Compiler Optimization
Linkedin Post: https://www.linkedin.com/feed/update/urn:li:activity:7391126562047373312/
Team: Inchara J, Shubhang Sinha, Yash Suthar
Event: Hackman V8
Result: 🥇 First Place