GlobalISel

Reference:

  • Instruction Selection
  • Reference LLVM Core Pipeline LLVM Core Pipleline – InstructionSelect InstructionSelect pass transforms generic machine instructions into equivalent target-specifc instructions. It traverses the MachineFunction bottom-up, selecting uses before definitions, enabling trivial dead code elimination. The target implements InstructionSelector class, containing target-specific selection logic. InstructionSelector::select virtual bool select(MachineInstr &MI) This method is responsible for mutating (or replacing) a possibly-generic MI into a fully target-specific equivalent. doing the necessary constraining of gvregs into the appropriate register classes passing through COPY instructions to the register allocator.

  • IRTranslator
  • Reference LLVM Core Pipleline LLVM Core Pipeline – IRTranslator llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp Overview This pass can be disabled according to LLVM selector type. There are three selector types: FastISel, GlobalISel, and SelectionDAG. Both FastISel and SelectionDAG do not use IRTranslator pass for ISel, but instead uses target dependent passes, such as MipsModuleDAGToDAGISel, Mips16DAGToDAGISel, MipsSEDAGToDAGISel, etc. see MipsPassConfig::addInstSelector() in llvm/lib/Target/Mips/MipsTargetMachine.cpp. Users can provide options to help LLVM determine the right selector type.

Created Jul 22, 2020 // Last Updated Jul 22, 2020

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?