LLVM 18.0.0git
AVRFrameLowering.cpp
Go to the documentation of this file.
1//===-- AVRFrameLowering.cpp - AVR Frame 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 AVR implementation of TargetFrameLowering class.
10//
11//===----------------------------------------------------------------------===//
12
13#include "AVRFrameLowering.h"
14
15#include "AVR.h"
16#include "AVRInstrInfo.h"
18#include "AVRTargetMachine.h"
20
26#include "llvm/IR/Function.h"
27
28#include <vector>
29
30namespace llvm {
31
33 : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(1), -2) {}
34
36 const MachineFunction &MF) const {
37 // Always simplify call frame pseudo instructions, even when
38 // hasReservedCallFrame is false.
39 return true;
40}
41
43 // Reserve call frame memory in function prologue under the following
44 // conditions:
45 // - Y pointer is reserved to be the frame pointer.
46 // - The function does not contain variable sized objects.
47
48 const MachineFrameInfo &MFI = MF.getFrameInfo();
49 return hasFP(MF) && !MFI.hasVarSizedObjects();
50}
51
53 MachineBasicBlock &MBB) const {
55 DebugLoc DL = (MBBI != MBB.end()) ? MBBI->getDebugLoc() : DebugLoc();
56 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
57 const AVRInstrInfo &TII = *STI.getInstrInfo();
60 bool HasFP = hasFP(MF);
61
62 // Interrupt handlers re-enable interrupts in function entry.
63 if (AFI->isInterruptHandler()) {
64 BuildMI(MBB, MBBI, DL, TII.get(AVR::BSETs))
65 .addImm(0x07)
67 }
68
69 // Emit special prologue code to save R1, R0 and SREG in interrupt/signal
70 // handlers before saving any other registers.
71 if (AFI->isInterruptOrSignalHandler()) {
72 BuildMI(MBB, MBBI, DL, TII.get(AVR::PUSHRr))
75
76 BuildMI(MBB, MBBI, DL, TII.get(AVR::INRdA), STI.getTmpRegister())
77 .addImm(STI.getIORegSREG())
79 BuildMI(MBB, MBBI, DL, TII.get(AVR::PUSHRr))
82 if (!MRI.reg_empty(STI.getZeroRegister())) {
83 BuildMI(MBB, MBBI, DL, TII.get(AVR::PUSHRr))
86 BuildMI(MBB, MBBI, DL, TII.get(AVR::EORRdRr))
91 }
92 }
93
94 // Early exit if the frame pointer is not needed in this function.
95 if (!HasFP) {
96 return;
97 }
98
99 const MachineFrameInfo &MFI = MF.getFrameInfo();
100 unsigned FrameSize = MFI.getStackSize() - AFI->getCalleeSavedFrameSize();
101
102 // Skip the callee-saved push instructions.
103 while (
104 (MBBI != MBB.end()) && MBBI->getFlag(MachineInstr::FrameSetup) &&
105 (MBBI->getOpcode() == AVR::PUSHRr || MBBI->getOpcode() == AVR::PUSHWRr)) {
106 ++MBBI;
107 }
108
109 // Update Y with the new base value.
110 BuildMI(MBB, MBBI, DL, TII.get(AVR::SPREAD), AVR::R29R28)
111 .addReg(AVR::SP)
113
114 // Mark the FramePtr as live-in in every block except the entry.
115 for (MachineBasicBlock &MBBJ : llvm::drop_begin(MF)) {
116 MBBJ.addLiveIn(AVR::R29R28);
117 }
118
119 if (!FrameSize) {
120 return;
121 }
122
123 // Reserve the necessary frame memory by doing FP -= <size>.
124 unsigned Opcode = (isUInt<6>(FrameSize) && STI.hasADDSUBIW()) ? AVR::SBIWRdK
125 : AVR::SUBIWRdK;
126
127 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opcode), AVR::R29R28)
128 .addReg(AVR::R29R28, RegState::Kill)
129 .addImm(FrameSize)
131 // The SREG implicit def is dead.
132 MI->getOperand(3).setIsDead();
133
134 // Write back R29R28 to SP and temporarily disable interrupts.
135 BuildMI(MBB, MBBI, DL, TII.get(AVR::SPWRITE), AVR::SP)
136 .addReg(AVR::R29R28)
138}
139
142 const MachineRegisterInfo &MRI = MF.getRegInfo();
143
145
146 DebugLoc DL = MBBI->getDebugLoc();
147 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
148 const AVRInstrInfo &TII = *STI.getInstrInfo();
149
150 // Emit special epilogue code to restore R1, R0 and SREG in interrupt/signal
151 // handlers at the very end of the function, just before reti.
152 if (AFI->isInterruptOrSignalHandler()) {
153 if (!MRI.reg_empty(STI.getZeroRegister())) {
154 BuildMI(MBB, MBBI, DL, TII.get(AVR::POPRd), STI.getZeroRegister());
155 }
156 BuildMI(MBB, MBBI, DL, TII.get(AVR::POPRd), STI.getTmpRegister());
157 BuildMI(MBB, MBBI, DL, TII.get(AVR::OUTARr))
158 .addImm(STI.getIORegSREG())
160 BuildMI(MBB, MBBI, DL, TII.get(AVR::POPRd), STI.getTmpRegister());
161 }
162}
163
165 MachineBasicBlock &MBB) const {
167
168 // Early exit if the frame pointer is not needed in this function except for
169 // signal/interrupt handlers where special code generation is required.
170 if (!hasFP(MF) && !AFI->isInterruptOrSignalHandler()) {
171 return;
172 }
173
174 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
175 assert(MBBI->getDesc().isReturn() &&
176 "Can only insert epilog into returning blocks");
177
178 DebugLoc DL = MBBI->getDebugLoc();
179 const MachineFrameInfo &MFI = MF.getFrameInfo();
180 unsigned FrameSize = MFI.getStackSize() - AFI->getCalleeSavedFrameSize();
181 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
182 const AVRInstrInfo &TII = *STI.getInstrInfo();
183
184 // Early exit if there is no need to restore the frame pointer.
185 if (!FrameSize && !MF.getFrameInfo().hasVarSizedObjects()) {
187 return;
188 }
189
190 // Skip the callee-saved pop instructions.
191 while (MBBI != MBB.begin()) {
192 MachineBasicBlock::iterator PI = std::prev(MBBI);
193 int Opc = PI->getOpcode();
194
195 if (Opc != AVR::POPRd && Opc != AVR::POPWRd && !PI->isTerminator()) {
196 break;
197 }
198
199 --MBBI;
200 }
201
202 if (FrameSize) {
203 unsigned Opcode;
204
205 // Select the optimal opcode depending on how big it is.
206 if (isUInt<6>(FrameSize) && STI.hasADDSUBIW()) {
207 Opcode = AVR::ADIWRdK;
208 } else {
209 Opcode = AVR::SUBIWRdK;
210 FrameSize = -FrameSize;
211 }
212
213 // Restore the frame pointer by doing FP += <size>.
214 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opcode), AVR::R29R28)
215 .addReg(AVR::R29R28, RegState::Kill)
216 .addImm(FrameSize);
217 // The SREG implicit def is dead.
218 MI->getOperand(3).setIsDead();
219 }
220
221 // Write back R29R28 to SP and temporarily disable interrupts.
222 BuildMI(MBB, MBBI, DL, TII.get(AVR::SPWRITE), AVR::SP)
223 .addReg(AVR::R29R28, RegState::Kill);
224
226}
227
228// Return true if the specified function should have a dedicated frame
229// pointer register. This is true if the function meets any of the following
230// conditions:
231// - a register has been spilled
232// - has allocas
233// - input arguments are passed using the stack
234//
235// Notice that strictly this is not a frame pointer because it contains SP after
236// frame allocation instead of having the original SP in function entry.
239
240 return (FuncInfo->getHasSpills() || FuncInfo->getHasAllocas() ||
241 FuncInfo->getHasStackArgs() ||
243}
244
248 if (CSI.empty()) {
249 return false;
250 }
251
252 unsigned CalleeFrameSize = 0;
253 DebugLoc DL = MBB.findDebugLoc(MI);
254 MachineFunction &MF = *MBB.getParent();
255 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
256 const TargetInstrInfo &TII = *STI.getInstrInfo();
258
259 for (const CalleeSavedInfo &I : llvm::reverse(CSI)) {
260 Register Reg = I.getReg();
261 bool IsNotLiveIn = !MBB.isLiveIn(Reg);
262
263 // Check if Reg is a sub register of a 16-bit livein register, and then
264 // add it to the livein list.
265 if (IsNotLiveIn)
266 for (const auto &LiveIn : MBB.liveins())
267 if (STI.getRegisterInfo()->isSubRegister(LiveIn.PhysReg, Reg)) {
268 IsNotLiveIn = false;
269 MBB.addLiveIn(Reg);
270 break;
271 }
272
273 assert(TRI->getRegSizeInBits(*TRI->getMinimalPhysRegClass(Reg)) == 8 &&
274 "Invalid register size");
275
276 // Add the callee-saved register as live-in only if it is not already a
277 // live-in register, this usually happens with arguments that are passed
278 // through callee-saved registers.
279 if (IsNotLiveIn) {
280 MBB.addLiveIn(Reg);
281 }
282
283 // Do not kill the register when it is an input argument.
284 BuildMI(MBB, MI, DL, TII.get(AVR::PUSHRr))
285 .addReg(Reg, getKillRegState(IsNotLiveIn))
287 ++CalleeFrameSize;
288 }
289
290 AVRFI->setCalleeSavedFrameSize(CalleeFrameSize);
291
292 return true;
293}
294
298 if (CSI.empty()) {
299 return false;
300 }
301
302 DebugLoc DL = MBB.findDebugLoc(MI);
303 const MachineFunction &MF = *MBB.getParent();
304 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
305 const TargetInstrInfo &TII = *STI.getInstrInfo();
306
307 for (const CalleeSavedInfo &CCSI : CSI) {
308 Register Reg = CCSI.getReg();
309
310 assert(TRI->getRegSizeInBits(*TRI->getMinimalPhysRegClass(Reg)) == 8 &&
311 "Invalid register size");
312
313 BuildMI(MBB, MI, DL, TII.get(AVR::POPRd), Reg);
314 }
315
316 return true;
317}
318
319/// Replace pseudo store instructions that pass arguments through the stack with
320/// real instructions.
323 const TargetInstrInfo &TII) {
324 // Iterate through the BB until we hit a call instruction or we reach the end.
325 for (MachineInstr &MI :
327 if (MI.isCall())
328 break;
329
330 unsigned Opcode = MI.getOpcode();
331
332 // Only care of pseudo store instructions where SP is the base pointer.
333 if (Opcode != AVR::STDSPQRr && Opcode != AVR::STDWSPQRr)
334 continue;
335
336 assert(MI.getOperand(0).getReg() == AVR::SP &&
337 "SP is expected as base pointer");
338
339 // Replace this instruction with a regular store. Use Y as the base
340 // pointer since it is guaranteed to contain a copy of SP.
341 unsigned STOpc =
342 (Opcode == AVR::STDWSPQRr) ? AVR::STDWPtrQRr : AVR::STDPtrQRr;
343
344 MI.setDesc(TII.get(STOpc));
345 MI.getOperand(0).setReg(AVR::R31R30);
346 }
347}
348
352 const AVRSubtarget &STI = MF.getSubtarget<AVRSubtarget>();
353 const AVRInstrInfo &TII = *STI.getInstrInfo();
354
355 if (hasReservedCallFrame(MF)) {
356 return MBB.erase(MI);
357 }
358
359 DebugLoc DL = MI->getDebugLoc();
360 unsigned int Opcode = MI->getOpcode();
361 int Amount = TII.getFrameSize(*MI);
362
363 if (Amount == 0) {
364 return MBB.erase(MI);
365 }
366
367 assert(getStackAlign() == Align(1) && "Unsupported stack alignment");
368
369 if (Opcode == TII.getCallFrameSetupOpcode()) {
370 // Update the stack pointer.
371 // In many cases this can be done far more efficiently by pushing the
372 // relevant values directly to the stack. However, doing that correctly
373 // (in the right order, possibly skipping some empty space for undef
374 // values, etc) is tricky and thus left to be optimized in the future.
375 BuildMI(MBB, MI, DL, TII.get(AVR::SPREAD), AVR::R31R30).addReg(AVR::SP);
376
377 MachineInstr *New =
378 BuildMI(MBB, MI, DL, TII.get(AVR::SUBIWRdK), AVR::R31R30)
379 .addReg(AVR::R31R30, RegState::Kill)
380 .addImm(Amount);
381 New->getOperand(3).setIsDead();
382
383 BuildMI(MBB, MI, DL, TII.get(AVR::SPWRITE), AVR::SP).addReg(AVR::R31R30);
384
385 // Make sure the remaining stack stores are converted to real store
386 // instructions.
388 } else {
389 assert(Opcode == TII.getCallFrameDestroyOpcode());
390
391 // Note that small stack changes could be implemented more efficiently
392 // with a few pop instructions instead of the 8-9 instructions now
393 // required.
394
395 // Select the best opcode to adjust SP based on the offset size.
396 unsigned AddOpcode;
397
398 if (isUInt<6>(Amount) && STI.hasADDSUBIW()) {
399 AddOpcode = AVR::ADIWRdK;
400 } else {
401 AddOpcode = AVR::SUBIWRdK;
402 Amount = -Amount;
403 }
404
405 // Build the instruction sequence.
406 BuildMI(MBB, MI, DL, TII.get(AVR::SPREAD), AVR::R31R30).addReg(AVR::SP);
407
408 MachineInstr *New = BuildMI(MBB, MI, DL, TII.get(AddOpcode), AVR::R31R30)
409 .addReg(AVR::R31R30, RegState::Kill)
410 .addImm(Amount);
411 New->getOperand(3).setIsDead();
412
413 BuildMI(MBB, MI, DL, TII.get(AVR::SPWRITE), AVR::SP)
414 .addReg(AVR::R31R30, RegState::Kill);
415 }
416
417 return MBB.erase(MI);
418}
419
421 BitVector &SavedRegs,
422 RegScavenger *RS) const {
424
425 // If we have a frame pointer, the Y register needs to be saved as well.
426 if (hasFP(MF)) {
427 SavedRegs.set(AVR::R29);
428 SavedRegs.set(AVR::R28);
429 }
430}
431/// The frame analyzer pass.
432///
433/// Scans the function for allocas and used arguments
434/// that are passed through the stack.
436 static char ID;
438
440 const MachineFrameInfo &MFI = MF.getFrameInfo();
442
443 // If there are no fixed frame indexes during this stage it means there
444 // are allocas present in the function.
445 if (MFI.getNumObjects() != MFI.getNumFixedObjects()) {
446 // Check for the type of allocas present in the function. We only care
447 // about fixed size allocas so do not give false positives if only
448 // variable sized allocas are present.
449 for (unsigned i = 0, e = MFI.getObjectIndexEnd(); i != e; ++i) {
450 // Variable sized objects have size 0.
451 if (MFI.getObjectSize(i)) {
452 AFI->setHasAllocas(true);
453 break;
454 }
455 }
456 }
457
458 // If there are fixed frame indexes present, scan the function to see if
459 // they are really being used.
460 if (MFI.getNumFixedObjects() == 0) {
461 return false;
462 }
463
464 // Ok fixed frame indexes present, now scan the function to see if they
465 // are really being used, otherwise we can ignore them.
466 for (const MachineBasicBlock &BB : MF) {
467 for (const MachineInstr &MI : BB) {
468 int Opcode = MI.getOpcode();
469
470 if ((Opcode != AVR::LDDRdPtrQ) && (Opcode != AVR::LDDWRdPtrQ) &&
471 (Opcode != AVR::STDPtrQRr) && (Opcode != AVR::STDWPtrQRr) &&
472 (Opcode != AVR::FRMIDX)) {
473 continue;
474 }
475
476 for (const MachineOperand &MO : MI.operands()) {
477 if (!MO.isFI()) {
478 continue;
479 }
480
481 if (MFI.isFixedObjectIndex(MO.getIndex())) {
482 AFI->setHasStackArgs(true);
483 return false;
484 }
485 }
486 }
487 }
488
489 return false;
490 }
491
492 StringRef getPassName() const override { return "AVR Frame Analyzer"; }
493};
494
495char AVRFrameAnalyzer::ID = 0;
496
497/// Creates instance of the frame analyzer pass.
499
500} // end of namespace llvm
unsigned const MachineRegisterInfo * MRI
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
const HexagonInstrInfo * TII
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition: MD5.cpp:58
unsigned const TargetRegisterInfo * TRI
unsigned Reg
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
bool canSimplifyCallFramePseudos(const MachineFunction &MF) const override
canSimplifyCallFramePseudos - When possible, it's best to simplify the call frame pseudo ops before d...
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
Utilities related to the AVR instruction set.
Definition: AVRInstrInfo.h:66
Contains AVR-specific information for each MachineFunction.
void setCalleeSavedFrameSize(unsigned Bytes)
bool isInterruptOrSignalHandler() const
Checks if the function is some form of interrupt service routine.
A specific AVR target MCU.
Definition: AVRSubtarget.h:32
Register getTmpRegister() const
Definition: AVRSubtarget.h:91
Register getZeroRegister() const
Definition: AVRSubtarget.h:94
const AVRInstrInfo * getInstrInfo() const override
Definition: AVRSubtarget.h:42
int getIORegSREG() const
Definition: AVRSubtarget.h:85
const AVRRegisterInfo * getRegisterInfo() const override
Definition: AVRSubtarget.h:52
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
bool empty() const
empty - Check if the array is empty.
Definition: ArrayRef.h:160
BitVector & set()
Definition: BitVector.h:351
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in t...
A debug info location.
Definition: DebugLoc.h:33
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:311
iterator getLastNonDebugInstr(bool SkipPseudoOp=true)
Returns an iterator to the last non-debug instruction in the basic block, or end().
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
unsigned getNumObjects() const
Return the number of objects.
int getObjectIndexEnd() const
Return one past the maximum frame object index.
unsigned getNumFixedObjects() const
Return the number of fixed objects.
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
const MachineInstrBuilder & setMIFlag(MachineInstr::MIFlag Flag) const
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Representation of each machine instruction.
Definition: MachineInstr.h:68
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:307
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Information about stack frame layout on the target.
virtual void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Align getStackAlign() const
getStackAlignment - This method returns the number of bytes to which the stack pointer must be aligne...
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
@ Define
Register definition.
@ Kill
The last use of a register.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
Definition: STLExtras.h:330
static void fixStackStores(MachineBasicBlock &MBB, MachineBasicBlock::iterator StartMI, const TargetInstrInfo &TII)
Replace pseudo store instructions that pass arguments through the stack with real instructions.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
Definition: STLExtras.h:666
FunctionPass * createAVRFrameAnalyzerPass()
Creates instance of the frame analyzer pass.
auto reverse(ContainerTy &&C)
Definition: STLExtras.h:429
unsigned getKillRegState(bool B)
static void restoreStatusRegister(MachineFunction &MF, MachineBasicBlock &MBB)
The frame analyzer pass.
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39