LLVM-Z80: Back to the '70s with a Modern Compiler

Type
Talk
Track
개발 언어 및 툴체인 (Programming Languages & Tooling)
Language
Korean

이 발표에서는 LLVM 프로젝트에 Z80 백엔드를 새로 추가한 개발 과정과 기술적 도전, 그리고 AI를 활용한 오픈소스 프로젝트 운영 경험을 공유합니다. 오래된 CPU 위에 현대 컴파일러 기술을 접목하는 과정을 중심으로, 레트로 컴퓨팅이라는 취미와 오픈소스 생태계에 대한 기여가 맞닿는 지점을 소개하고자 합니다.

This talk shares the development process and technical challenges of adding a new Z80 backend to the LLVM project, along with my experience running an open-source project with the help of AI. The talk focuses on the process of bringing modern compiler technology to an old CPU, and aims to show where the hobby of vintage computing meets contribution to the open-source ecosystem.


1976년에 발표된 CPU인 Z80은 C 언어가 널리 쓰이기 이전에 발매된 CPU로, 20세기부터 현재까지 다양한 PC, 게임 콘솔, 임베디드 시스템 등을 거쳐 현재까지도 사용되고 있는 CPU입니다. 저는 이러한 Z80을 대상으로 C, C++, Rust 등의 현대 언어를 컴파일할 수 있는 LLVM-Z80 프로젝트를 진행하고 있습니다.

LLVM의 최신 코드 생성 프레임워크를 기반으로 Z80 CPU 대상 코드 생성 백엔드를 구현한 경험을 공유함으로써, 오래된 아키텍처 위에서 현대 컴파일러 인프라가 어떻게 동작할 수 있는지, 그리고 그 과정에서 마주친 문제점들과 기술적 선택에 대해 다루고자 합니다. 더불어 LLVM-Z80과 같은 취미 프로젝트가 오픈소스 생태계에 어떻게 기여로 이어질 수 있는지도 함께 이야기합니다.

나아가, AI를 활용해 대형 오픈소스 프로젝트의 포크를 개발 관리하며 느낀 점을 공유합니다. 예전이라면 팀이나 기업 단위로나 가능했을 규모의 코드베이스를, 이제는 개인이 AI의 도움을 받아 혼자서도 들여다보고 관리할 수 있게 됐습니다. 이런 변화 속에서 개인 개발자가 오픈소스에 기여할 수 있는 방식 자체도 조금씩 달라지고 있다고 생각합니다.

레트로 컴퓨팅은 단순히 옛날 기기를 수집하고 전시하는 것을 넘어, 그 기기를 직접 써보고, 고치고, 그 위에서 새롭게 무언가를 만들어보는 활동입니다. 수십 년 전 하드웨어의 한계 속에서 코드를 짜보는 경험은 지금의 컴퓨팅 환경에서는 느끼기 어려운 재미를 줍니다. 이 발표를 통해 레트로 컴퓨팅에 관심을 갖는 분들이 더 늘어나기를 바랍니다.

The Z80, released in 1976, came out before the C language was in wide use. It has passed through PCs, game consoles, and embedded systems over the decades, and while it’s no longer as widespread as it once was, it’s still in use today.

I’ll share my experience building a Z80 code-generation backend on top of LLVM’s latest code-generation framework, covering how a modern compiler infrastructure can work on such an old architecture, and the problems I ran into and the technical choices I made along the way. I’ll also talk about how a hobby project like LLVM-Z80 can turn into a contribution to the bigger open-source ecosystem.

I’ll also share what I’ve learned from developing and maintaining a fork of a large open-source project with the help of AI. Codebases that used to need a whole team or company to manage can now be handled by one person with AI help. I think this is changing how individual developers can contribute to open source.

Retrocomputing is more than collecting and displaying old machines. It means actually using them, fixing them, and building something new on top of them. Writing code within the limits of decades-old hardware is fun in a way that’s hard to get from today’s computing environment. Through this talk, I hope more people get interested in retrocomputing.

Speakers