Skip to content

Bringup 13 checklist

Mugundan edited this page Nov 27, 2026 · 1 revision

Bring-up Checklist and AArch64 File Map

Relevant source files

The following files were used as context for generating this wiki page:

A list of milestones from "empty target" to `-O2` object files, each with a test, followed by a map of where each piece lives in the AArch64 backend so you can read the real version.

Purpose and Scope

A checklist to track progress. Each item links to the page that explains it. The MC-specific steps (encoding, fixups, relocations, parser, disassembler) are listed in detail on the MC checklist, and the allocation-specific ones on the regalloc backend checklist.

Milestones

A. The target exists

B. A function compiles to assembly at -O0

  • Registers and one register class (Registers and Allocation)
  • MC glue: asm info, instr/reg/subtarget info, instruction printer (AsmPrinter and MC)
  • ToyTargetMachine, ToySubtarget, ToyPassConfig::addInstSelector
  • ToyTargetLowering constructor: addRegisterClass, computeRegisterProperties (TargetLowering Setup)
  • LowerFormalArguments, LowerReturn, CC_Toy, RetCC_Toy (Calling Conventions)
  • ADD, RET and a selector (Instructions and ISel)
  • ToyFrameLowering, getReservedRegs, getFrameRegister, eliminateFrameIndex (Frame Lowering)
  • ToyAsmPrinter, ToyMCInstLower
  • Test: llc -march=toy -O0 -verify-machineinstrs add.ll

C. Real programs at -O0

  • Loads, stores, constants, globals (custom GlobalAddress lowering)
  • Compares and branches (BR_CC expanded or custom)
  • LowerCall, CALL pattern, getCallPreservedMask, call-frame pseudos (calling conventions wiki)
  • copyPhysReg, storeRegToStackSlot, loadRegFromStackSlot (regalloc TII hooks)
  • Operation actions for everything the hardware lacks (division, wide multiplies, rotates)
  • Test: a small C program compiled by clang --target=toy -O0 -S, every function verified

D. -O2

  • analyzeBranch, insertBranch, removeBranch so branch folding and block placement work
  • Callee-saved spills appear and are correct (frame wiki: callee saves)
  • Large frames: eliminateFrameIndex with the register scavenger (frame wiki: frame index)
  • Frame pointer and variable-sized objects (hasFPImpl)
  • Varargs and tail calls (calling conventions wiki, tail calls)
  • enableMachineScheduler, a scheduling model (scheduling wiki)
  • Test: the same programs at -O2 -verify-machineinstrs; run them on hardware or a simulator

E. Object files and tools

  • Encodings in TableGen, MCCodeEmitter, fixup kinds, MCAsmBackend, ELF object writer (MC checklist)
  • CFI from frame lowering so debuggers and unwinders work (frame wiki: CFI)
  • Asm parser (llvm-mc, inline asm) and disassembler (llvm-objdump)
  • lit tests under llvm/test/CodeGen/Toy and llvm/test/MC/Toy

AArch64 File Map

Where to look in llvm/lib/Target/AArch64/ for the real version of each piece:

Piece AArch64 file Wiki page
Root TableGen AArch64.td The Target .td File
Features, processors AArch64Features.td, AArch64Processors.td The Target .td File
Registers AArch64RegisterInfo.td, AArch64RegisterInfo.cpp Registers and Allocation
Calling conventions AArch64CallingConvention.td, AArch64CallingConvention.cpp Calling Conventions
Instructions AArch64InstrFormats.td, AArch64InstrInfo.td, AArch64InstrInfo.cpp Instructions and ISel
Lowering AArch64ISelLowering.cpp TargetLowering Setup
Selector AArch64ISelDAGToDAG.cpp Instructions and ISel
Target machine, pass config AArch64TargetMachine.cpp TargetMachine and Subtarget
Subtarget AArch64Subtarget.cpp, AArch64Subtarget.h TargetMachine and Subtarget
Frame AArch64FrameLowering.cpp, AArch64PrologueEpilogue.cpp Frame Lowering
Scheduling AArch64Schedule.td, AArch64Sched*.td Scheduling
Printer AArch64AsmPrinter.cpp, AArch64MCInstLower.cpp AsmPrinter and MC
MC MCTargetDesc/ MC wiki
Target info TargetInfo/AArch64TargetInfo.cpp Layout and CMake
Build CMakeLists.txt Layout and CMake

Sources: llvm/lib/Target/AArch64/CMakeLists.txt:1-33, llvm/lib/Target/AArch64/AArch64.td:16-58

Start here

Computer Organization & Architecture

Hexagon ISA

Operating Systems

C++ for LLVM Development

LLVM IR

SelectionDAG

Backend Assignments

Target Bring-up

Calling Conventions

Frame Lowering

MC Layer

Register Allocation

Scheduling

Clone this wiki locally