LLVM 19.0.0git
StackSlotColoring.cpp
Go to the documentation of this file.
1//===- StackSlotColoring.cpp - Stack slot coloring pass. ------------------===//
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 implements the stack slot coloring pass.
10//
11//===----------------------------------------------------------------------===//
12
13#include "llvm/ADT/BitVector.h"
15#include "llvm/ADT/Statistic.h"
28#include "llvm/CodeGen/Passes.h"
35#include "llvm/Pass.h"
38#include "llvm/Support/Debug.h"
40#include <algorithm>
41#include <cassert>
42#include <cstdint>
43#include <iterator>
44#include <vector>
45
46using namespace llvm;
47
48#define DEBUG_TYPE "stack-slot-coloring"
49
50static cl::opt<bool>
51DisableSharing("no-stack-slot-sharing",
52 cl::init(false), cl::Hidden,
53 cl::desc("Suppress slot sharing during stack coloring"));
54
55static cl::opt<int> DCELimit("ssc-dce-limit", cl::init(-1), cl::Hidden);
56
57STATISTIC(NumEliminated, "Number of stack slots eliminated due to coloring");
58STATISTIC(NumDead, "Number of trivially dead stack accesses eliminated");
59
60namespace {
61
62 class StackSlotColoring : public MachineFunctionPass {
63 LiveStacks *LS = nullptr;
64 MachineFrameInfo *MFI = nullptr;
65 const TargetInstrInfo *TII = nullptr;
66 const MachineBlockFrequencyInfo *MBFI = nullptr;
67
68 // SSIntervals - Spill slot intervals.
69 std::vector<LiveInterval*> SSIntervals;
70
71 // SSRefs - Keep a list of MachineMemOperands for each spill slot.
72 // MachineMemOperands can be shared between instructions, so we need
73 // to be careful that renames like [FI0, FI1] -> [FI1, FI2] do not
74 // become FI0 -> FI1 -> FI2.
76
77 // OrigAlignments - Alignments of stack objects before coloring.
78 SmallVector<Align, 16> OrigAlignments;
79
80 // OrigSizes - Sizes of stack objects before coloring.
82
83 // AllColors - If index is set, it's a spill slot, i.e. color.
84 // FIXME: This assumes PEI locate spill slot with smaller indices
85 // closest to stack pointer / frame pointer. Therefore, smaller
86 // index == better color. This is per stack ID.
88
89 // NextColor - Next "color" that's not yet used. This is per stack ID.
90 SmallVector<int, 2> NextColors = { -1 };
91
92 // UsedColors - "Colors" that have been assigned. This is per stack ID
94
95 // Join all intervals sharing one color into a single LiveIntervalUnion to
96 // speedup range overlap test.
97 class ColorAssignmentInfo {
98 // Single liverange (used to avoid creation of LiveIntervalUnion).
99 LiveInterval *SingleLI = nullptr;
100 // LiveIntervalUnion to perform overlap test.
101 LiveIntervalUnion *LIU = nullptr;
102 // LiveIntervalUnion has a parameter in its constructor so doing this
103 // dirty magic.
104 uint8_t LIUPad[sizeof(LiveIntervalUnion)];
105
106 public:
107 ~ColorAssignmentInfo() {
108 if (LIU)
109 LIU->~LiveIntervalUnion(); // Dirty magic again.
110 }
111
112 // Return true if LiveInterval overlaps with any
113 // intervals that have already been assigned to this color.
114 bool overlaps(LiveInterval *LI) const {
115 if (LIU)
117 return SingleLI ? SingleLI->overlaps(*LI) : false;
118 }
119
120 // Add new LiveInterval to this color.
122 assert(!overlaps(LI));
123 if (LIU) {
124 LIU->unify(*LI, *LI);
125 } else if (SingleLI) {
126 LIU = new (LIUPad) LiveIntervalUnion(Alloc);
127 LIU->unify(*SingleLI, *SingleLI);
128 LIU->unify(*LI, *LI);
129 SingleLI = nullptr;
130 } else
131 SingleLI = LI;
132 }
133 };
134
136
137 // Assignments - Color to intervals mapping.
139
140 public:
141 static char ID; // Pass identification
142
143 StackSlotColoring() : MachineFunctionPass(ID) {
145 }
146
147 void getAnalysisUsage(AnalysisUsage &AU) const override {
148 AU.setPreservesCFG();
156 }
157
158 bool runOnMachineFunction(MachineFunction &MF) override;
159
160 private:
161 void InitializeSlots();
162 void ScanForSpillSlotRefs(MachineFunction &MF);
163 int ColorSlot(LiveInterval *li);
164 bool ColorSlots(MachineFunction &MF);
165 void RewriteInstruction(MachineInstr &MI, SmallVectorImpl<int> &SlotMapping,
166 MachineFunction &MF);
167 bool RemoveDeadStores(MachineBasicBlock* MBB);
168 };
169
170} // end anonymous namespace
171
172char StackSlotColoring::ID = 0;
173
174char &llvm::StackSlotColoringID = StackSlotColoring::ID;
175
177 "Stack Slot Coloring", false, false)
182 "Stack Slot Coloring", false, false)
183
184namespace {
185
186// IntervalSorter - Comparison predicate that sort live intervals by
187// their weight.
190 return LHS->weight() > RHS->weight();
191 }
192};
193
194} // end anonymous namespace
195
196/// ScanForSpillSlotRefs - Scan all the machine instructions for spill slot
197/// references and update spill slot weights.
198void StackSlotColoring::ScanForSpillSlotRefs(MachineFunction &MF) {
199 SSRefs.resize(MFI->getObjectIndexEnd());
200
201 // FIXME: Need the equivalent of MachineRegisterInfo for frameindex operands.
202 for (MachineBasicBlock &MBB : MF) {
203 for (MachineInstr &MI : MBB) {
204 for (const MachineOperand &MO : MI.operands()) {
205 if (!MO.isFI())
206 continue;
207 int FI = MO.getIndex();
208 if (FI < 0)
209 continue;
210 if (!LS->hasInterval(FI))
211 continue;
212 LiveInterval &li = LS->getInterval(FI);
213 if (!MI.isDebugInstr())
215 LiveIntervals::getSpillWeight(false, true, MBFI, MI));
216 }
217 for (MachineInstr::mmo_iterator MMOI = MI.memoperands_begin(),
218 EE = MI.memoperands_end();
219 MMOI != EE; ++MMOI) {
220 MachineMemOperand *MMO = *MMOI;
221 if (const FixedStackPseudoSourceValue *FSV =
222 dyn_cast_or_null<FixedStackPseudoSourceValue>(
223 MMO->getPseudoValue())) {
224 int FI = FSV->getFrameIndex();
225 if (FI >= 0)
226 SSRefs[FI].push_back(MMO);
227 }
228 }
229 }
230 }
231}
232
233/// InitializeSlots - Process all spill stack slot liveintervals and add them
234/// to a sorted (by weight) list.
235void StackSlotColoring::InitializeSlots() {
236 int LastFI = MFI->getObjectIndexEnd();
237
238 // There is always at least one stack ID.
239 AllColors.resize(1);
240 UsedColors.resize(1);
241
242 OrigAlignments.resize(LastFI);
243 OrigSizes.resize(LastFI);
244 AllColors[0].resize(LastFI);
245 UsedColors[0].resize(LastFI);
246 Assignments.resize(LastFI);
247
248 using Pair = std::iterator_traits<LiveStacks::iterator>::value_type;
249
250 SmallVector<Pair *, 16> Intervals;
251
252 Intervals.reserve(LS->getNumIntervals());
253 for (auto &I : *LS)
254 Intervals.push_back(&I);
255 llvm::sort(Intervals,
256 [](Pair *LHS, Pair *RHS) { return LHS->first < RHS->first; });
257
258 // Gather all spill slots into a list.
259 LLVM_DEBUG(dbgs() << "Spill slot intervals:\n");
260 for (auto *I : Intervals) {
261 LiveInterval &li = I->second;
262 LLVM_DEBUG(li.dump());
263 int FI = Register::stackSlot2Index(li.reg());
264 if (MFI->isDeadObjectIndex(FI))
265 continue;
266
267 SSIntervals.push_back(&li);
268 OrigAlignments[FI] = MFI->getObjectAlign(FI);
269 OrigSizes[FI] = MFI->getObjectSize(FI);
270
271 auto StackID = MFI->getStackID(FI);
272 if (StackID != 0) {
273 AllColors.resize(StackID + 1);
274 UsedColors.resize(StackID + 1);
275 AllColors[StackID].resize(LastFI);
276 UsedColors[StackID].resize(LastFI);
277 }
278
279 AllColors[StackID].set(FI);
280 }
281 LLVM_DEBUG(dbgs() << '\n');
282
283 // Sort them by weight.
284 llvm::stable_sort(SSIntervals, IntervalSorter());
285
286 NextColors.resize(AllColors.size());
287
288 // Get first "color".
289 for (unsigned I = 0, E = AllColors.size(); I != E; ++I)
290 NextColors[I] = AllColors[I].find_first();
291}
292
293/// ColorSlot - Assign a "color" (stack slot) to the specified stack slot.
294int StackSlotColoring::ColorSlot(LiveInterval *li) {
295 int Color = -1;
296 bool Share = false;
297 int FI = Register::stackSlot2Index(li->reg());
298 uint8_t StackID = MFI->getStackID(FI);
299
300 if (!DisableSharing) {
301
302 // Check if it's possible to reuse any of the used colors.
303 Color = UsedColors[StackID].find_first();
304 while (Color != -1) {
305 if (!Assignments[Color].overlaps(li)) {
306 Share = true;
307 ++NumEliminated;
308 break;
309 }
310 Color = UsedColors[StackID].find_next(Color);
311 }
312 }
313
314 if (Color != -1 && MFI->getStackID(Color) != MFI->getStackID(FI)) {
315 LLVM_DEBUG(dbgs() << "cannot share FIs with different stack IDs\n");
316 Share = false;
317 }
318
319 // Assign it to the first available color (assumed to be the best) if it's
320 // not possible to share a used color with other objects.
321 if (!Share) {
322 assert(NextColors[StackID] != -1 && "No more spill slots?");
323 Color = NextColors[StackID];
324 UsedColors[StackID].set(Color);
325 NextColors[StackID] = AllColors[StackID].find_next(NextColors[StackID]);
326 }
327
328 assert(MFI->getStackID(Color) == MFI->getStackID(FI));
329
330 // Record the assignment.
331 Assignments[Color].add(li, LIUAlloc);
332 LLVM_DEBUG(dbgs() << "Assigning fi#" << FI << " to fi#" << Color << "\n");
333
334 // Change size and alignment of the allocated slot. If there are multiple
335 // objects sharing the same slot, then make sure the size and alignment
336 // are large enough for all.
337 Align Alignment = OrigAlignments[FI];
338 if (!Share || Alignment > MFI->getObjectAlign(Color))
339 MFI->setObjectAlignment(Color, Alignment);
340 int64_t Size = OrigSizes[FI];
341 if (!Share || Size > MFI->getObjectSize(Color))
342 MFI->setObjectSize(Color, Size);
343 return Color;
344}
345
346/// Colorslots - Color all spill stack slots and rewrite all frameindex machine
347/// operands in the function.
348bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
349 unsigned NumObjs = MFI->getObjectIndexEnd();
351 SmallVector<float, 16> SlotWeights(NumObjs, 0.0);
352 SmallVector<SmallVector<int, 4>, 16> RevMap(NumObjs);
353 BitVector UsedColors(NumObjs);
354
355 LLVM_DEBUG(dbgs() << "Color spill slot intervals:\n");
356 bool Changed = false;
357 for (LiveInterval *li : SSIntervals) {
358 int SS = Register::stackSlot2Index(li->reg());
359 int NewSS = ColorSlot(li);
360 assert(NewSS >= 0 && "Stack coloring failed?");
361 SlotMapping[SS] = NewSS;
362 RevMap[NewSS].push_back(SS);
363 SlotWeights[NewSS] += li->weight();
364 UsedColors.set(NewSS);
365 Changed |= (SS != NewSS);
366 }
367
368 LLVM_DEBUG(dbgs() << "\nSpill slots after coloring:\n");
369 for (LiveInterval *li : SSIntervals) {
370 int SS = Register::stackSlot2Index(li->reg());
371 li->setWeight(SlotWeights[SS]);
372 }
373 // Sort them by new weight.
374 llvm::stable_sort(SSIntervals, IntervalSorter());
375
376#ifndef NDEBUG
377 for (LiveInterval *li : SSIntervals)
378 LLVM_DEBUG(li->dump());
379 LLVM_DEBUG(dbgs() << '\n');
380#endif
381
382 if (!Changed)
383 return false;
384
385 // Rewrite all MachineMemOperands.
386 for (unsigned SS = 0, SE = SSRefs.size(); SS != SE; ++SS) {
387 int NewFI = SlotMapping[SS];
388 if (NewFI == -1 || (NewFI == (int)SS))
389 continue;
390
391 const PseudoSourceValue *NewSV = MF.getPSVManager().getFixedStack(NewFI);
392 SmallVectorImpl<MachineMemOperand *> &RefMMOs = SSRefs[SS];
393 for (unsigned i = 0, e = RefMMOs.size(); i != e; ++i)
394 RefMMOs[i]->setValue(NewSV);
395 }
396
397 // Rewrite all MO_FrameIndex operands. Look for dead stores.
398 for (MachineBasicBlock &MBB : MF) {
399 for (MachineInstr &MI : MBB)
400 RewriteInstruction(MI, SlotMapping, MF);
401 RemoveDeadStores(&MBB);
402 }
403
404 // Delete unused stack slots.
405 for (int StackID = 0, E = AllColors.size(); StackID != E; ++StackID) {
406 int NextColor = NextColors[StackID];
407 while (NextColor != -1) {
408 LLVM_DEBUG(dbgs() << "Removing unused stack object fi#" << NextColor << "\n");
409 MFI->RemoveStackObject(NextColor);
410 NextColor = AllColors[StackID].find_next(NextColor);
411 }
412 }
413
414 return true;
415}
416
417/// RewriteInstruction - Rewrite specified instruction by replacing references
418/// to old frame index with new one.
419void StackSlotColoring::RewriteInstruction(MachineInstr &MI,
421 MachineFunction &MF) {
422 // Update the operands.
423 for (MachineOperand &MO : MI.operands()) {
424 if (!MO.isFI())
425 continue;
426 int OldFI = MO.getIndex();
427 if (OldFI < 0)
428 continue;
429 int NewFI = SlotMapping[OldFI];
430 if (NewFI == -1 || NewFI == OldFI)
431 continue;
432
433 assert(MFI->getStackID(OldFI) == MFI->getStackID(NewFI));
434 MO.setIndex(NewFI);
435 }
436
437 // The MachineMemOperands have already been updated.
438}
439
440/// RemoveDeadStores - Scan through a basic block and look for loads followed
441/// by stores. If they're both using the same stack slot, then the store is
442/// definitely dead. This could obviously be much more aggressive (consider
443/// pairs with instructions between them), but such extensions might have a
444/// considerable compile time impact.
445bool StackSlotColoring::RemoveDeadStores(MachineBasicBlock* MBB) {
446 // FIXME: This could be much more aggressive, but we need to investigate
447 // the compile time impact of doing so.
448 bool changed = false;
449
451
453 I != E; ++I) {
454 if (DCELimit != -1 && (int)NumDead >= DCELimit)
455 break;
456 int FirstSS, SecondSS;
457 if (TII->isStackSlotCopy(*I, FirstSS, SecondSS) && FirstSS == SecondSS &&
458 FirstSS != -1) {
459 ++NumDead;
460 changed = true;
461 toErase.push_back(&*I);
462 continue;
463 }
464
465 MachineBasicBlock::iterator NextMI = std::next(I);
466 MachineBasicBlock::iterator ProbableLoadMI = I;
467
468 unsigned LoadReg = 0;
469 unsigned StoreReg = 0;
470 unsigned LoadSize = 0;
471 unsigned StoreSize = 0;
472 if (!(LoadReg = TII->isLoadFromStackSlot(*I, FirstSS, LoadSize)))
473 continue;
474 // Skip the ...pseudo debugging... instructions between a load and store.
475 while ((NextMI != E) && NextMI->isDebugInstr()) {
476 ++NextMI;
477 ++I;
478 }
479 if (NextMI == E) continue;
480 if (!(StoreReg = TII->isStoreToStackSlot(*NextMI, SecondSS, StoreSize)))
481 continue;
482 if (FirstSS != SecondSS || LoadReg != StoreReg || FirstSS == -1 ||
483 LoadSize != StoreSize || !MFI->isSpillSlotObjectIndex(FirstSS))
484 continue;
485
486 ++NumDead;
487 changed = true;
488
489 if (NextMI->findRegisterUseOperandIdx(LoadReg, true, nullptr) != -1) {
490 ++NumDead;
491 toErase.push_back(&*ProbableLoadMI);
492 }
493
494 toErase.push_back(&*NextMI);
495 ++I;
496 }
497
498 for (MachineInstr *MI : toErase)
499 MI->eraseFromParent();
500
501 return changed;
502}
503
504bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
505 LLVM_DEBUG({
506 dbgs() << "********** Stack Slot Coloring **********\n"
507 << "********** Function: " << MF.getName() << '\n';
508 });
509
510 if (skipFunction(MF.getFunction()))
511 return false;
512
513 MFI = &MF.getFrameInfo();
515 LS = &getAnalysis<LiveStacks>();
516 MBFI = &getAnalysis<MachineBlockFrequencyInfo>();
517
518 bool Changed = false;
519
520 unsigned NumSlots = LS->getNumIntervals();
521 if (NumSlots == 0)
522 // Nothing to do!
523 return false;
524
525 // If there are calls to setjmp or sigsetjmp, don't perform stack slot
526 // coloring. The stack could be modified before the longjmp is executed,
527 // resulting in the wrong value being used afterwards.
528 if (MF.exposesReturnsTwice())
529 return false;
530
531 // Gather spill slot references
532 ScanForSpillSlotRefs(MF);
533 InitializeSlots();
534 Changed = ColorSlots(MF);
535
536 for (int &Next : NextColors)
537 Next = -1;
538
539 SSIntervals.clear();
540 for (unsigned i = 0, e = SSRefs.size(); i != e; ++i)
541 SSRefs[i].clear();
542 SSRefs.clear();
543 OrigAlignments.clear();
544 OrigSizes.clear();
545 AllColors.clear();
546 UsedColors.clear();
547 Assignments.clear();
548
549 return Changed;
550}
MachineBasicBlock & MBB
This file implements the BitVector class.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_DEBUG(X)
Definition: Debug.h:101
uint64_t Size
const HexagonInstrInfo * TII
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition: MD5.cpp:58
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition: PassSupport.h:55
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:59
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:52
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
Stack Slot Coloring
static cl::opt< bool > DisableSharing("no-stack-slot-sharing", cl::init(false), cl::Hidden, cl::desc("Suppress slot sharing during stack coloring"))
#define DEBUG_TYPE
static cl::opt< int > DCELimit("ssc-dce-limit", cl::init(-1), cl::Hidden)
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
Definition: Statistic.h:167
Value * RHS
Value * LHS
Represent the analysis usage information of a pass.
AnalysisUsage & addPreservedID(const void *ID)
AnalysisUsage & addRequired()
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
void setPreservesCFG()
This function should be called by the pass, iff they do not:
Definition: Pass.cpp:269
A specialized PseudoSourceValue for holding FixedStack values, which must include a frame index.
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
TargetInstrInfo overrides.
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
If the specified machine instruction is a direct store to a stack slot, return the virtual or physica...
Query interferences between a single live virtual register and a live interval union.
Union of live intervals that are strong candidates for coalescing into a single register (either phys...
void unify(const LiveInterval &VirtReg, const LiveRange &Range)
LiveSegments::Allocator Allocator
LiveInterval - This class represents the liveness of a register, or stack slot.
Definition: LiveInterval.h:687
float weight() const
Definition: LiveInterval.h:719
Register reg() const
Definition: LiveInterval.h:718
void incrementWeight(float Inc)
Definition: LiveInterval.h:720
void setWeight(float Value)
Definition: LiveInterval.h:721
static float getSpillWeight(bool isDef, bool isUse, const MachineBlockFrequencyInfo *MBFI, const MachineInstr &MI)
Calculate the spill weight to assign to a single instruction.
bool overlaps(const LiveRange &other) const
overlaps - Return true if the intersection of the two live ranges is not empty.
Definition: LiveInterval.h:448
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
void setObjectSize(int ObjectIdx, int64_t Size)
Change the size of the specified stack object.
Align getObjectAlign(int ObjectIdx) const
Return the alignment of the specified stack object.
bool isSpillSlotObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a spill slot.
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
void RemoveStackObject(int ObjectIdx)
Remove or mark dead a statically sized stack object.
int getObjectIndexEnd() const
Return one past the maximum frame object index.
uint8_t getStackID(int ObjectIdx) const
void setObjectAlignment(int ObjectIdx, Align Alignment)
setObjectAlignment - Change the alignment of the specified stack object.
bool isDeadObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a dead object.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
PseudoSourceValueManager & getPSVManager() const
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
bool exposesReturnsTwice() const
exposesReturnsTwice - Returns true if the function calls setjmp or any other similar functions with a...
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
Definition: MachineInstr.h:69
A description of a memory reference used in the backend.
const PseudoSourceValue * getPseudoValue() const
MachineOperand class - Representation of each machine instruction operand.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
const PseudoSourceValue * getFixedStack(int FI)
Return a pseudo source value referencing a fixed stack frame entry, e.g., a spill slot.
Special value supplied for machine level alias analysis.
static int stackSlot2Index(Register Reg)
Compute the frame index from a register value representing a stack slot.
Definition: Register.h:52
SlotIndexes pass.
Definition: SlotIndexes.h:300
size_t size() const
Definition: SmallVector.h:91
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:586
void reserve(size_type N)
Definition: SmallVector.h:676
void resize(size_type N)
Definition: SmallVector.h:651
void push_back(const T &Elt)
Definition: SmallVector.h:426
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
TargetInstrInfo - Interface to description of machine instruction set.
virtual const TargetInstrInfo * getInstrInfo() const
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
@ SS
Definition: X86.h:207
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:450
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void stable_sort(R &&Range)
Definition: STLExtras.h:2004
void initializeStackSlotColoringPass(PassRegistry &)
char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
void sort(IteratorTy Start, IteratorTy End)
Definition: STLExtras.h:1656
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:163
char & StackSlotColoringID
StackSlotColoring - This pass performs stack slot coloring.
bool operator()(LiveInterval *LHS, LiveInterval *RHS) const
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
This struct contains the mappings from the slot numbers to unnamed metadata nodes,...
Definition: SlotMapping.h:33