The instruction selection creates machine instructions, represented by the MachineInstr class, from LLVM IR. But this is not the end.…