Skip to content

M9: GlobalISel and TableGen #18

Description

@tamnd

Seven weeks. Parts VIII and IX, GlobalISel and TableGen. Fourteen lessons, and the generator that makes the backend capstone maintainable.

Exit criterion. gen_td generates the target fact sections of the BP-CG-* and BP-TD-* blueprints from llvm-tblgen -dump-json, for three targets, with no hand editing.

Tasks

  • G01 to G06
  • D01 to D08
  • BP-CG-GISEL, BP-TD-LANG, BP-TD-BACKENDS, BP-TD-TARGET
  • irx.td and the RecordBrowser widget
  • gen_td

Gates

  • gen_td produces target fact sections for three targets with no hand editing
  • G01's status claims carry a date and the command that established them, and a reviewer confirms they hold for the pin
  • D04's twenty line Python TableGen backend is completed by testers in under an hour
  • BP-TD-TARGET is complete enough that M10 can start

TableGen comes late and is taught backwards. You write a backend in twenty lines of Python over the JSON dump before you ever read a C++ one, because by Part IX you have used six things TableGen generated and "what produced this table" is a question you already have rather than one somebody has to give you.

GlobalISel status claims get a date and a command because this is the area of LLVM where documentation goes stale fastest. What is default for which target at which optimisation level changes between releases and the docs have been burned by it repeatedly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/codegenSelectionDAG, GlobalISel, regalloc, MC, the back endarea/tablegenTableGen records, backends and generated fileskind/milestoneTracking issue for a whole milestonepriority/p1Needed this milestone

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions