1 //===-- M68k.h - Top-level interface for M68k representation ----*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 /// 9 /// \file 10 /// This file contains the entry points for global functions defined in the 11 /// M68k target library, as used by the LLVM JIT. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_LIB_TARGET_M68K_M68K_H 16 #define LLVM_LIB_TARGET_M68K_M68K_H 17 18 namespace llvm { 19 20 class FunctionPass; 21 class InstructionSelector; 22 class M68kRegisterBankInfo; 23 class M68kSubtarget; 24 class M68kTargetMachine; 25 26 /// This pass converts a legalized DAG into a M68k-specific DAG, ready for 27 /// instruction scheduling. 28 FunctionPass *createM68kISelDag(M68kTargetMachine &TM); 29 30 /// Return a Machine IR pass that expands M68k-specific pseudo 31 /// instructions into a sequence of actual instructions. This pass 32 /// must run after prologue/epilogue insertion and before lowering 33 /// the MachineInstr to MC. 34 FunctionPass *createM68kExpandPseudoPass(); 35 36 /// This pass initializes a global base register for PIC on M68k. 37 FunctionPass *createM68kGlobalBaseRegPass(); 38 39 /// Finds sequential MOVEM instruction and collapse them into a single one. This 40 /// pass has to be run after all pseudo expansions and prologue/epilogue 41 /// emission so that all possible MOVEM are already in place. 42 FunctionPass *createM68kCollapseMOVEMPass(); 43 44 /// Finds MOVE instructions before any conditioanl branch instruction and 45 /// replaces them with MOVEM instruction. Motorola's MOVEs do trash(V,C) flags 46 /// register which prevents branch from taking the correct route. This pass 47 /// has to be run after all pseudo expansions and prologue/epilogue emission 48 /// so that all possible MOVEs are present. 49 FunctionPass *createM68kConvertMOVToMOVMPass(); 50 51 InstructionSelector * 52 createM68kInstructionSelector(const M68kTargetMachine &, const M68kSubtarget &, 53 const M68kRegisterBankInfo &); 54 55 } // namespace llvm 56 57 #endif // LLVM_LIB_TARGET_M68K_M68K_H 58