LLVM-MCA Assembly Code Playground

MakeUC 2025 • Education × Arm × Compilers

What is this?

An interactive web tutor that helps college students learn how high-level C/C++ becomes assembly and machine code, and how that code actually runs on Arm CPUs. Students can paste code, run llvm-mca to see IPC, uOps/cycle, total cycles, visualize bottlenecks, and get a concise explanation (Gemini) with optimization tips.

Why it matters
  • Bridges the gap between compilers and CPU microarchitecture.
  • Makes pipeline behavior visible (ports, stalls, throughput).
  • Teaches practical optimization (unrolling, vectorization/NEON, memory access patterns).

How to use

  1. Go to 📊 Analysis, paste AArch64 assembly (or switch to C mode), pick a CPU (e.g., apple-m2), and click Analyze.
  2. View metrics & timeline, then click Explain for a plain-English summary and next steps.
  3. Try 🔄 Translate to convert C/C++ → AArch64 assembly + machine-code hex.
Great first experiments
  • Compare -O0 vs -O3 on a loop.
  • Swap scalar adds for NEON vector adds; observe IPC.
  • Analyze a tiny matmul kernel, then apply loop tiling/unrolling.

Tracks & Goals

  • Education: Learn assembly vs machine code, and CPU pipeline basics.
  • Arm Learning: Analyze for apple-m2, neoverse-v2, etc., and connect to topics like NEON/SVE/SME2.
  • AI Tutor: Gemini explains why performance changes and suggests targeted fixes.