Skip to Main Content
Talk Intermediate CC BY-SA 4.0 First Talk

What LLVM Does Differently When The Target Is CPU VS GPU

Proposal status is Approved
Session Description

Most people working with LLVM know the pipeline: source → IR → analysis passes → optimization passes → codegen to machine code. What's less obvious is that when learning about this pipeline, they silently assume the target is a CPU, but LLVM lowers and optimizes for GPUs too.

In this talk I'll take a function, compile it for x86-64 and NVPTX, and walk through exactly where the pipelines diverge and why. We'll see what the middle-end shares between the two targets and where things change fundamentally. I will also cover the instruction selection differences between the two-level ISA on NVIDIA (PTX → SASS) vs direct ISA emission on AMD.

The talk closes with a look at LLVM's growing role in GPU development with projects like cuTile and CUDA-OXIDE both targeting LLVM IR and why that makes LLVM contribution directly relevant to the future of open GPU tooling.

Key Takeaways

1) Where exactly in the LLVM pipeline CPUs and GPUs share code , and where they don't.

2)How Divergence analysis on GPU dictates restructuring of the CFG

3)Why GPU register allocation optimizes for occupancy instead of spill minimization

References

Session Categories

Technology architecture
Talk License: CC BY-SA 4.0

Which track are you applying for?

Compilers, Programming Languages and Systems

Speakers

Bhuvan Open Source Contributor

I am pursuing a B.E in Computer Science Engineering at Dayananda Sagar College of Engineering, Bangalore.I am an ACM SIGPLAN-M mentee and a Linux Foundation LiFT Scholar.I have interests in Compiler Engineering , parallel programming ,High performance computing ,C, C++, LLVM, Operating systems and open source.

I have worked on devirtualization passes and optimising virtual method tables and MLIR dialects. I have contributions in RTEMS and Open Robotics.

Bhuvan
https://www.linkedin.com/in/bhuvanb404