1.. _porting: 2 3Porting GlobalISel to A New Target 4================================== 5 6There are four major classes to implement by the target: 7 8* :ref:`CallLowering <translator-call-lower>` --- lower calls, returns, and 9 arguments according to the ABI. 10* :ref:`RegisterBankInfo <api-registerbankinfo>` --- describe 11 :ref:`gmir-regbank` coverage, cross-bank copy cost, and the mapping of 12 operands onto banks for each instruction. 13* :ref:`LegalizerInfo <api-legalizerinfo>` --- describe what is legal, and how 14 to legalize what isn't. 15* :ref:`InstructionSelector <api-instructionselector>` --- select generic MIR 16 to target-specific MIR. 17 18Additionally: 19 20* ``TargetPassConfig`` --- create the passes constituting the pipeline, 21 including additional passes not included in the :ref:`pipeline`. 22 23Tutorials 24========= 25 26We'd recommend watching `this tutorial 27<https://www.llvm.org/devmtg/2017-10/#tutorial2>`_ from the 2017 LLVM DevMeeting 28which gave an overview of how to bring up a new backend in GlobalISel. 29