When I started working on Mesa I needed to know what all the moving parts were. This is the map I built.
Four separate things, all of which need to support your GPU:
"The drivers are in the kernel" is only true for the KMD. Mesa, firmware, and shader compilers are separate packages your distro manages independently.
Mesa has two main driver families: Gallium (OpenGL, OpenCL, video) and Vulkan drivers. They're separate because Vulkan is lower-level than the abstraction Gallium provides.
NIR is the shared IR across Mesa drivers. Optimization passes written for NIR benefit every driver that uses it. Most modern Mesa drivers do.
ACO was written specifically for RADV because LLVM's compile times and code quality weren't good enough for interactive use. It's a full compiler backend written from scratch, and for graphics workloads it beats LLVM on both speed and output quality.
Mesa and the kernel DRM subsystem move fast. New hardware support, bug fixes, and performance work land constantly. Running packages from 6 months ago means missing a lot of that. Distros that ship old Mesa in the name of "stability" are getting that tradeoff backwards — old drivers have more bugs, not fewer.
Working on ACO makes the stack concrete. Register allocation has to account for occupancy — more live registers means fewer concurrent wavefronts, which reduces the GPU's ability to hide memory latency. Instruction scheduling has to keep execution units fed despite long latencies. These constraints don't exist in CPU compilers at the same scale.