LLVM 24.0.0git
Mips16InstrInfo.cpp
Go to the documentation of this file.
1//===- Mips16InstrInfo.cpp - Mips16 Instruction Information ---------------===//
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// This file contains the Mips16 implementation of the TargetInstrInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#include "Mips16InstrInfo.h"
14#include "llvm/ADT/BitVector.h"
24#include "llvm/IR/DebugLoc.h"
27#include <cassert>
28#include <cstdint>
29#include <iterator>
30#include <vector>
31
32using namespace llvm;
33
34#define DEBUG_TYPE "mips16-instrinfo"
35
37 : MipsInstrInfo(STI, RI, Mips::Bimm16), RI(STI) {}
38
39/// isLoadFromStackSlot - If the specified machine instruction is a direct
40/// load from a stack slot, return the virtual or physical register number of
41/// the destination along with the FrameIndex of the loaded stack slot. If
42/// not, return 0. This predicate must return 0 if the instruction has
43/// any side effects other than loading from the stack slot.
45 int &FrameIndex) const {
46 return 0;
47}
48
49/// isStoreToStackSlot - If the specified machine instruction is a direct
50/// store to a stack slot, return the virtual or physical register number of
51/// the source reg along with the FrameIndex of the loaded stack slot. If
52/// not, return 0. This predicate must return 0 if the instruction has
53/// any side effects other than storing to the stack slot.
55 int &FrameIndex) const {
56 return 0;
57}
58
61 const DebugLoc &DL, Register DestReg,
62 Register SrcReg, bool KillSrc,
63 bool RenamableDest, bool RenamableSrc) const {
64 unsigned Opc = 0;
65
66 if (Mips::CPU16RegsRegClass.contains(DestReg) &&
67 Mips::GPR32RegClass.contains(SrcReg))
68 Opc = Mips::MoveR3216;
69 else if (Mips::GPR32RegClass.contains(DestReg) &&
70 Mips::CPU16RegsRegClass.contains(SrcReg))
71 Opc = Mips::Move32R16;
72 else if ((SrcReg == Mips::HI0) &&
73 (Mips::CPU16RegsRegClass.contains(DestReg)))
74 Opc = Mips::Mfhi16, SrcReg = 0;
75 else if ((SrcReg == Mips::LO0) &&
76 (Mips::CPU16RegsRegClass.contains(DestReg)))
77 Opc = Mips::Mflo16, SrcReg = 0;
78
79 assert(Opc && "Cannot copy registers");
80
82
83 if (DestReg)
84 MIB.addReg(DestReg, RegState::Define);
85
86 if (SrcReg)
87 MIB.addReg(SrcReg, getKillRegState(KillSrc));
88}
89
90std::optional<DestSourcePair>
92 if (MI.isMoveReg())
93 return DestSourcePair{MI.getOperand(0), MI.getOperand(1)};
94 return std::nullopt;
95}
96
99 Register SrcReg, bool isKill, int FI,
100 const TargetRegisterClass *RC,
101 int64_t Offset,
102 MachineInstr::MIFlag Flags) const {
103 DebugLoc DL;
104 if (I != MBB.end()) DL = I->getDebugLoc();
106 unsigned Opc = 0;
107 if (Mips::CPU16RegsRegClass.hasSubClassEq(RC))
108 Opc = Mips::SwRxSpImmX16;
109 assert(Opc && "Register class not handled!");
110 BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)).
111 addFrameIndex(FI).addImm(Offset)
112 .addMemOperand(MMO);
113}
114
117 Register DestReg, int FI,
118 const TargetRegisterClass *RC,
119 int64_t Offset,
120 MachineInstr::MIFlag Flags) const {
121 DebugLoc DL;
122 if (I != MBB.end()) DL = I->getDebugLoc();
124 unsigned Opc = 0;
125
126 if (Mips::CPU16RegsRegClass.hasSubClassEq(RC))
127 Opc = Mips::LwRxSpImmX16;
128 assert(Opc && "Register class not handled!");
129 BuildMI(MBB, I, DL, get(Opc), DestReg).addFrameIndex(FI).addImm(Offset)
130 .addMemOperand(MMO);
131}
132
134 MachineBasicBlock &MBB = *MI.getParent();
135 switch (MI.getDesc().getOpcode()) {
136 default:
137 return false;
138 case Mips::RetRA16:
139 ExpandRetRA16(MBB, MI, Mips::JrcRa16);
140 break;
141 }
142
143 MBB.erase(MI.getIterator());
144 return true;
145}
146
147/// GetOppositeBranchOpc - Return the inverse of the specified
148/// opcode, e.g. turning BEQ to BNE.
150 switch (Opc) {
151 case Mips::BeqzRxImmX16: return Mips::BnezRxImmX16;
152 case Mips::BnezRxImmX16: return Mips::BeqzRxImmX16;
153 case Mips::BeqzRxImm16: return Mips::BnezRxImm16;
154 case Mips::BnezRxImm16: return Mips::BeqzRxImm16;
155 case Mips::BteqzT8CmpX16: return Mips::BtnezT8CmpX16;
156 case Mips::BteqzT8SltX16: return Mips::BtnezT8SltX16;
157 case Mips::BteqzT8SltiX16: return Mips::BtnezT8SltiX16;
158 case Mips::Btnez16: return Mips::Bteqz16;
159 case Mips::BtnezX16: return Mips::BteqzX16;
160 case Mips::BtnezT8CmpiX16: return Mips::BteqzT8CmpiX16;
161 case Mips::BtnezT8SltuX16: return Mips::BteqzT8SltuX16;
162 case Mips::BtnezT8SltiuX16: return Mips::BteqzT8SltiuX16;
163 case Mips::Bteqz16: return Mips::Btnez16;
164 case Mips::BteqzX16: return Mips::BtnezX16;
165 case Mips::BteqzT8CmpiX16: return Mips::BtnezT8CmpiX16;
166 case Mips::BteqzT8SltuX16: return Mips::BtnezT8SltuX16;
167 case Mips::BteqzT8SltiuX16: return Mips::BtnezT8SltiuX16;
168 case Mips::BtnezT8CmpX16: return Mips::BteqzT8CmpX16;
169 case Mips::BtnezT8SltX16: return Mips::BteqzT8SltX16;
170 case Mips::BtnezT8SltiX16: return Mips::BteqzT8SltiX16;
171 }
172 llvm_unreachable("Illegal opcode!");
173}
174
177 RegState Flags = {}) {
178 for (unsigned i = 0, e = CSI.size(); i != e; ++i) {
179 // Add the callee-saved register as live-in. Do not add if the register is
180 // RA and return address is taken, because it has already been added in
181 // method MipsTargetLowering::lowerRETURNADDR.
182 // It's killed at the spill, unless the register is RA and return address
183 // is taken.
184 Register Reg = CSI[e-i-1].getReg();
185 switch (Reg) {
186 case Mips::RA:
187 case Mips::S0:
188 case Mips::S1:
189 MIB.addReg(Reg, Flags);
190 break;
191 case Mips::S2:
192 break;
193 default:
194 llvm_unreachable("unexpected mips16 callee saved register");
195
196 }
197 }
198}
199
200// Adjust SP by FrameSize bytes. Save RA, S0, S1
201void Mips16InstrInfo::makeFrame(unsigned SP, int64_t FrameSize,
204 DebugLoc DL;
205 MachineFunction &MF = *MBB.getParent();
206 MachineFrameInfo &MFI = MF.getFrameInfo();
207 const BitVector Reserved = RI.getReservedRegs(MF);
208 bool SaveS2 = Reserved[Mips::S2];
210 unsigned Opc = ((FrameSize <= 128) && !SaveS2)? Mips::Save16:Mips::SaveX16;
211 MIB = BuildMI(MBB, I, DL, get(Opc));
212 const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
213 addSaveRestoreRegs(MIB, CSI);
214 if (SaveS2)
215 MIB.addReg(Mips::S2);
216 if (isUInt<11>(FrameSize))
217 MIB.addImm(FrameSize);
218 else {
219 int Base = 2040; // should create template function like isUInt that
220 // returns largest possible n bit unsigned integer
221 int64_t Remainder = FrameSize - Base;
222 MIB.addImm(Base);
223 if (isInt<16>(-Remainder))
224 BuildAddiuSpImm(MBB, I, -Remainder);
225 else
226 adjustStackPtrBig(SP, -Remainder, MBB, I, Mips::V0, Mips::V1);
227 }
228}
229
230// Adjust SP by FrameSize bytes. Restore RA, S0, S1
231void Mips16InstrInfo::restoreFrame(unsigned SP, int64_t FrameSize,
234 DebugLoc DL = I != MBB.end() ? I->getDebugLoc() : DebugLoc();
235 MachineFunction *MF = MBB.getParent();
236 MachineFrameInfo &MFI = MF->getFrameInfo();
237 const BitVector Reserved = RI.getReservedRegs(*MF);
238 bool SaveS2 = Reserved[Mips::S2];
240 unsigned Opc = ((FrameSize <= 128) && !SaveS2)?
241 Mips::Restore16:Mips::RestoreX16;
242
243 if (!isUInt<11>(FrameSize)) {
244 unsigned Base = 2040;
245 int64_t Remainder = FrameSize - Base;
246 FrameSize = Base; // should create template function like isUInt that
247 // returns largest possible n bit unsigned integer
248
249 if (isInt<16>(Remainder))
250 BuildAddiuSpImm(MBB, I, Remainder);
251 else
252 adjustStackPtrBig(SP, Remainder, MBB, I, Mips::A0, Mips::A1);
253 }
254 MIB = BuildMI(MBB, I, DL, get(Opc));
255 const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
257 if (SaveS2)
258 MIB.addReg(Mips::S2, RegState::Define);
259 MIB.addImm(FrameSize);
260}
261
262// Adjust SP by Amount bytes where bytes can be up to 32bit number.
263// This can only be called at times that we know that there is at least one free
264// register.
265// This is clearly safe at prologue and epilogue.
266void Mips16InstrInfo::adjustStackPtrBig(unsigned SP, int64_t Amount,
269 unsigned Reg1, unsigned Reg2) const {
270 DebugLoc DL;
271 //
272 // li reg1, constant
273 // move reg2, sp
274 // add reg1, reg1, reg2
275 // move sp, reg1
276 //
277 //
278 MachineInstrBuilder MIB1 = BuildMI(MBB, I, DL, get(Mips::LwConstant32), Reg1);
279 MIB1.addImm(Amount).addImm(-1);
280 MachineInstrBuilder MIB2 = BuildMI(MBB, I, DL, get(Mips::MoveR3216), Reg2);
281 MIB2.addReg(Mips::SP, RegState::Kill);
282 MachineInstrBuilder MIB3 = BuildMI(MBB, I, DL, get(Mips::AdduRxRyRz16), Reg1);
283 MIB3.addReg(Reg1);
284 MIB3.addReg(Reg2, RegState::Kill);
285 MachineInstrBuilder MIB4 = BuildMI(MBB, I, DL, get(Mips::Move32R16),
286 Mips::SP);
287 MIB4.addReg(Reg1, RegState::Kill);
288}
289
290void Mips16InstrInfo::adjustStackPtrBigUnrestricted(
291 unsigned SP, int64_t Amount, MachineBasicBlock &MBB,
293 llvm_unreachable("adjust stack pointer amount exceeded");
294}
295
296/// Adjust SP by Amount bytes.
297void Mips16InstrInfo::adjustStackPtr(unsigned SP, int64_t Amount,
300 if (Amount == 0)
301 return;
302
303 if (isInt<16>(Amount)) // need to change to addiu sp, ....and isInt<16>
304 BuildAddiuSpImm(MBB, I, Amount);
305 else
306 adjustStackPtrBigUnrestricted(SP, Amount, MBB, I);
307}
308
309/// This function generates the sequence of instructions needed to get the
310/// result of adding register REG and immediate IMM.
311unsigned Mips16InstrInfo::loadImmediate(unsigned FrameReg, int64_t Imm,
314 const DebugLoc &DL,
315 unsigned &NewImm) const {
316 //
317 // given original instruction is:
318 // Instr rx, T[offset] where offset is too big.
319 //
320 // lo = offset & 0xFFFF
321 // hi = ((offset >> 16) + (lo >> 15)) & 0xFFFF;
322 //
323 // let T = temporary register
324 // li T, hi
325 // shl T, 16
326 // add T, Rx, T
327 //
328 RegScavenger rs;
329 int32_t lo = Imm & 0xFFFF;
330 NewImm = lo;
331 int Reg =0;
332 int SpReg = 0;
333
335 rs.backward(std::next(II));
336 //
337 // We need to know which registers can be used, in the case where there
338 // are not enough free registers. We exclude all registers that
339 // are used in the instruction that we are helping.
340 // // Consider all allocatable registers in the register class initially
341 BitVector Candidates =
342 RI.getAllocatableSet
343 (*II->getParent()->getParent(), &Mips::CPU16RegsRegClass);
344 // Exclude all the registers being used by the instruction.
345 for (MachineOperand &MO : II->operands()) {
346 if (MO.isReg() && MO.getReg() != 0 && !MO.isDef() &&
347 !MO.getReg().isVirtual())
348 Candidates.reset(MO.getReg());
349 }
350
351 // If the same register was used and defined in an instruction, then
352 // it will not be in the list of candidates.
353 //
354 // we need to analyze the instruction that we are helping.
355 // we need to know if it defines register x but register x is not
356 // present as an operand of the instruction. this tells
357 // whether the register is live before the instruction. if it's not
358 // then we don't need to save it in case there are no free registers.
359 int DefReg = 0;
360 for (MachineOperand &MO : II->operands()) {
361 if (MO.isReg() && MO.isDef()) {
362 DefReg = MO.getReg();
363 break;
364 }
365 }
366
367 BitVector Available = rs.getRegsAvailable(&Mips::CPU16RegsRegClass);
368 Available &= Candidates;
369 //
370 // we use T0 for the first register, if we need to save something away.
371 // we use T1 for the second register, if we need to save something away.
372 //
373 unsigned FirstRegSaved =0, SecondRegSaved=0;
374 unsigned FirstRegSavedTo = 0, SecondRegSavedTo = 0;
375
376 Reg = Available.find_first();
377
378 if (Reg == -1) {
379 Reg = Candidates.find_first();
380 Candidates.reset(Reg);
381 if (DefReg != Reg) {
382 FirstRegSaved = Reg;
383 FirstRegSavedTo = Mips::T0;
384 copyPhysReg(MBB, II, DL, FirstRegSavedTo, FirstRegSaved, true);
385 }
386 }
387 else
388 Available.reset(Reg);
389 BuildMI(MBB, II, DL, get(Mips::LwConstant32), Reg).addImm(Imm).addImm(-1);
390 NewImm = 0;
391 if (FrameReg == Mips::SP) {
392 SpReg = Available.find_first();
393 if (SpReg == -1) {
394 SpReg = Candidates.find_first();
395 // Candidates.reset(SpReg); // not really needed
396 if (DefReg!= SpReg) {
397 SecondRegSaved = SpReg;
398 SecondRegSavedTo = Mips::T1;
399 }
400 if (SecondRegSaved)
401 copyPhysReg(MBB, II, DL, SecondRegSavedTo, SecondRegSaved, true);
402 } else {
403 Available.reset(SpReg);
404 }
405 copyPhysReg(MBB, II, DL, SpReg, Mips::SP, false);
406 BuildMI(MBB, II, DL, get(Mips::AdduRxRyRz16), Reg)
407 .addReg(SpReg, RegState::Kill)
408 .addReg(Reg);
409 }
410 else
411 BuildMI(MBB, II, DL, get(Mips:: AdduRxRyRz16), Reg).addReg(FrameReg)
412 .addReg(Reg, RegState::Kill);
413 if (FirstRegSaved || SecondRegSaved) {
414 II = std::next(II);
415 if (FirstRegSaved)
416 copyPhysReg(MBB, II, DL, FirstRegSaved, FirstRegSavedTo, true);
417 if (SecondRegSaved)
418 copyPhysReg(MBB, II, DL, SecondRegSaved, SecondRegSavedTo, true);
419 }
420 return Reg;
421}
422
423unsigned Mips16InstrInfo::getAnalyzableBrOpc(unsigned Opc) const {
424 return (Opc == Mips::BeqzRxImmX16 || Opc == Mips::BimmX16 ||
425 Opc == Mips::Bimm16 ||
426 Opc == Mips::Bteqz16 || Opc == Mips::Btnez16 ||
427 Opc == Mips::BeqzRxImm16 || Opc == Mips::BnezRxImm16 ||
428 Opc == Mips::BnezRxImmX16 || Opc == Mips::BteqzX16 ||
429 Opc == Mips::BteqzT8CmpX16 || Opc == Mips::BteqzT8CmpiX16 ||
430 Opc == Mips::BteqzT8SltX16 || Opc == Mips::BteqzT8SltuX16 ||
431 Opc == Mips::BteqzT8SltiX16 || Opc == Mips::BteqzT8SltiuX16 ||
432 Opc == Mips::BtnezX16 || Opc == Mips::BtnezT8CmpX16 ||
433 Opc == Mips::BtnezT8CmpiX16 || Opc == Mips::BtnezT8SltX16 ||
434 Opc == Mips::BtnezT8SltuX16 || Opc == Mips::BtnezT8SltiX16 ||
435 Opc == Mips::BtnezT8SltiuX16 ) ? Opc : 0;
436}
437
438void Mips16InstrInfo::ExpandRetRA16(MachineBasicBlock &MBB,
440 unsigned Opc) const {
441 BuildMI(MBB, I, I->getDebugLoc(), get(Opc));
442}
443
445 if (validSpImm8(Imm))
446 return get(Mips::AddiuSpImm16);
447 else
448 return get(Mips::AddiuSpImmX16);
449}
450
456
458 return new Mips16InstrInfo(STI);
459}
460
461bool Mips16InstrInfo::validImmediate(unsigned Opcode, unsigned Reg,
462 int64_t Amount) {
463 switch (Opcode) {
464 case Mips::LbRxRyOffMemX16:
465 case Mips::LbuRxRyOffMemX16:
466 case Mips::LhRxRyOffMemX16:
467 case Mips::LhuRxRyOffMemX16:
468 case Mips::SbRxRyOffMemX16:
469 case Mips::ShRxRyOffMemX16:
470 case Mips::LwRxRyOffMemX16:
471 case Mips::SwRxRyOffMemX16:
472 case Mips::SwRxSpImmX16:
473 case Mips::LwRxSpImmX16:
474 return isInt<16>(Amount);
475 case Mips::AddiuRxRyOffMemX16:
476 if ((Reg == Mips::PC) || (Reg == Mips::SP))
477 return isInt<16>(Amount);
478 return isInt<15>(Amount);
479 }
480 llvm_unreachable("unexpected Opcode in validImmediate");
481}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
unsigned Imm
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file implements the BitVector class.
@ Available
We know the block is fully available. This is a fixpoint.
Definition GVN.cpp:960
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition MD5.cpp:57
Register Reg
static void addSaveRestoreRegs(MachineInstrBuilder &MIB, ArrayRef< CalleeSavedInfo > CSI, RegState Flags={})
uint64_t IntrinsicInst * II
This file declares the machine register scavenger class.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
Definition Value.cpp:484
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
size_t size() const
Get the array size.
Definition ArrayRef.h:141
BitVector & reset()
Reset all bits in the bitvector.
Definition BitVector.h:409
int find_first() const
Returns the index of the first set bit, -1 if none of the bits are set.
Definition BitVector.h:317
A debug info location.
Definition DebugLoc.h:126
Describe properties that are true of each instruction in the target description file.
MachineInstrBundleIterator< MachineInstr > iterator
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
const MachineInstrBuilder & addReg(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a new virtual register operand.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MachineInstrBuilder & addFrameIndex(int Idx) const
const MachineInstrBuilder & addMemOperand(MachineMemOperand *MMO) const
Representation of each machine instruction.
A description of a memory reference used in the backend.
@ MOLoad
The memory access reads data.
@ MOStore
The memory access writes data.
MachineOperand class - Representation of each machine instruction operand.
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot,...
bool expandPostRAPseudo(MachineInstr &MI) const override
static bool validImmediate(unsigned Opcode, unsigned Reg, int64_t Amount)
const MCInstrDesc & AddiuSpImm(int64_t Imm) const
void makeFrame(unsigned SP, int64_t FrameSize, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
void BuildAddiuSpImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, int64_t Imm) const
void loadRegFromStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, int64_t Offset, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
unsigned getOppositeBranchOpc(unsigned Opc) const override
GetOppositeBranchOpc - Return the inverse of the specified opcode, e.g.
std::optional< DestSourcePair > isCopyInstrImpl(const MachineInstr &MI) const override
If the specific machine instruction is a instruction that moves/copies value from one register to ano...
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
isStoreToStackSlot - If the specified machine instruction is a direct store to a stack slot,...
static bool validSpImm8(int offset)
void restoreFrame(unsigned SP, int64_t FrameSize, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
Mips16InstrInfo(const MipsSubtarget &STI)
unsigned loadImmediate(unsigned FrameReg, int64_t Imm, MachineBasicBlock &MBB, MachineBasicBlock::iterator II, const DebugLoc &DL, unsigned &NewImm) const
Emit a series of instructions to load an immediate.
void adjustStackPtr(unsigned SP, int64_t Amount, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
Adjust SP by Amount bytes.
void storeRegToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, int64_t Offset, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
MachineMemOperand * GetMemOperand(MachineBasicBlock &MBB, int FI, MachineMemOperand::Flags Flags) const
MipsInstrInfo(const MipsSubtarget &STI, const MipsRegisterInfo &RI, unsigned UncondBrOpc)
LLVM_ABI void enterBasicBlockEnd(MachineBasicBlock &MBB)
Start tracking liveness from the end of basic block MBB.
LLVM_ABI void backward()
Update internal register state and move MBB iterator backwards.
LLVM_ABI BitVector getRegsAvailable(const TargetRegisterClass *RC)
Return all available registers in the register class in Mask.
Wrapper class representing virtual and physical registers.
Definition Register.h:20
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr double e
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:577
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
constexpr bool isInt(int64_t x)
Checks if an integer fits into the given bit width.
Definition MathExtras.h:166
RegState
Flags to represent properties of register accesses.
@ Kill
The last use of a register.
@ Define
Register definition.
constexpr RegState getKillRegState(bool B)
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
constexpr bool isUInt(uint64_t x)
Checks if an unsigned integer fits into the given bit width.
Definition MathExtras.h:190
const MipsInstrInfo * createMips16InstrInfo(const MipsSubtarget &STI)
Create MipsInstrInfo objects.
MCRegisterClass TargetRegisterClass
Definition FastISel.h:58