LLVM  14.0.0git
M68k.h
Go to the documentation of this file.
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
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::createM68kCollapseMOVEMPass
FunctionPass * createM68kCollapseMOVEMPass()
Finds sequential MOVEM instruction and collapse them into a single one.
Definition: M68kCollapseMOVEMPass.cpp:305
llvm::createM68kConvertMOVToMOVMPass
FunctionPass * createM68kConvertMOVToMOVMPass()
Finds MOVE instructions before any conditioanl branch instruction and replaces them with MOVEM instru...
llvm::createM68kISelDag
FunctionPass * createM68kISelDag(M68kTargetMachine &TM)
This pass converts a legalized DAG into a M68k-specific DAG, ready for instruction scheduling.
Definition: M68kISelDAGToDAG.cpp:321
llvm::createM68kExpandPseudoPass
FunctionPass * createM68kExpandPseudoPass()
Return a Machine IR pass that expands M68k-specific pseudo instructions into a sequence of actual ins...
Definition: M68kExpandPseudo.cpp:318
llvm::createM68kInstructionSelector
InstructionSelector * createM68kInstructionSelector(const M68kTargetMachine &TM, const M68kSubtarget &Subtarget, const M68kRegisterBankInfo &RBI)
Definition: M68kInstructionSelector.cpp:85
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::createM68kGlobalBaseRegPass
FunctionPass * createM68kGlobalBaseRegPass()
This pass initializes a global base register for PIC on M68k.
Definition: M68kInstrInfo.cpp:869