LLVM  14.0.0git
Namespaces | Functions
M68kInstrBuilder.h File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/MC/MCInstrDesc.h"
#include <cassert>
Include dependency graph for M68kInstrBuilder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
 llvm::M68k
 Define some predicates that are used for node matching.
 

Functions

static const MachineInstrBuilder & llvm::M68k::addOffset (const MachineInstrBuilder &MIB, int Offset)
 
static const MachineInstrBuilder & llvm::M68k::addRegIndirectWithDisp (const MachineInstrBuilder &MIB, Register Reg, bool IsKill, int Offset)
 addRegIndirectWithDisp - This function is used to add a memory reference of the form (Offset, Base), i.e., one with no scale or index, but with a displacement. More...
 
static const MachineInstrBuilder & llvm::M68k::addFrameReference (const MachineInstrBuilder &MIB, int FI, int Offset=0)
 addFrameReference - This function is used to add a reference to the base of an abstract object on the stack frame of the current function. More...
 
static const MachineInstrBuilder & llvm::M68k::addMemOperand (const MachineInstrBuilder &MIB, int FI, int Offset=0)
 

Detailed Description

This file exposes functions that may be used with BuildMI from the MachineInstrBuilder.h file to handle M68k'isms in a clean way.

TODO The BuildMem function may be used with the BuildMI function to add entire memory references in a single, typed, function call. M68k memory references can be very complex expressions (described in the README), so wrapping them up behind an easier to use interface makes sense. Descriptions of the functions are included below.

For reference, the order of operands for memory references is: (Operand), Base, Scale, Index, Displacement.

Definition in file M68kInstrBuilder.h.