LLVM: include/llvm/CodeGen/MachineBasicBlock.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CODEGEN_MACHINEBASICBLOCK_H
14#define LLVM_CODEGEN_MACHINEBASICBLOCK_H
15
29#include
30#include
31#include
32#include
33#include
34
35namespace llvm {
36
52
53
54
55
56
57
66
68
69
72
76
78
79private:
80
82};
83
87
96 NumberInfo::getHashValue(SecID.Number));
97 }
101};
102
104private:
106
108
109 using instr_iterator =
111
112public:
116 instr_iterator First,
117 instr_iterator Last);
119};
120
121class MachineBasicBlock
123public:
124
125
126
128 public:
131
134
138 };
139
140private:
142
145
146
147
148
149
150
151
152 unsigned CallFrameSize = 0;
153
155 Instructions Insts;
156
157
160
161
162
163
164 std::vector Probs;
165 using probability_iterator = std::vector::iterator;
166 using const_probability_iterator =
167 std::vector::const_iterator;
168
169 std::optional<uint64_t> IrrLoopHeaderWeight;
170
171
172 using LiveInVector = std::vector;
173 LiveInVector LiveIns;
174
175
176
178
179
180
181 unsigned MaxBytesForAlignment = 0;
182
183
184 bool IsEHPad = false;
185
186
187
188 bool MachineBlockAddressTaken = false;
189
190
191
192 BasicBlock *AddressTakenIRBlock = nullptr;
193
194
195
196 bool LabelMustBeEmitted = false;
197
198
199
200
201 bool IsEHScopeEntry = false;
202
203
204 bool IsEHContTarget = false;
205
206
207 bool IsEHFuncletEntry = false;
208
209
210 bool IsCleanupFuncletEntry = false;
211
212
213
214 std::optional BBID;
215
216
218
219
220 bool IsBeginSection = false;
221
222
223 bool IsEndSection = false;
224
225
226 bool IsInlineAsmBrIndirectTarget = false;
227
228
229
230 mutable MCSymbol *CachedMCSymbol = nullptr;
231
232
233 mutable MCSymbol *CachedEHContMCSymbol = nullptr;
234
235
236
237 mutable MCSymbol *CachedEndMCSymbol = nullptr;
238
239
240 MachineBasicBlock() = default;
241
242 explicit MachineBasicBlock(MachineFunction &MF, const BasicBlock *BB);
243
244 ~MachineBasicBlock();
245
246
248
249public:
250
251
252
254
255
256
260
261
263
264
266
267
269
270
271
272
273
274
275
276
277
278
279
280
281
283 return MachineBlockAddressTaken || AddressTakenIRBlock ||
284 IsInlineAsmBrIndirectTarget;
285 }
286
287
288
289
290
291
292
293
295
296
297
298
299
300
302
303
305
306
307
308
310
311
312
314
315
317
318
319
321
322
325
326
327
328
335
340
346
347 unsigned size() const { return (unsigned)Insts.size(); }
349 bool empty() const { return Insts.empty(); }
350
355
360
369
376
391
392
394 return &MachineBasicBlock::Insts;
395 }
396
403
404
409 return const_cast<MachineBasicBlock *>(this)->phis();
410 }
411
412
432 { return Predecessors.rbegin();}
434 { return Predecessors.rbegin();}
436 { return Predecessors.rend(); }
438 { return Predecessors.rend(); }
440 return (unsigned)Predecessors.size();
441 }
442 bool pred_empty() const { return Predecessors.empty(); }
448 { return Successors.rbegin(); }
450 { return Successors.rbegin(); }
452 { return Successors.rend(); }
454 { return Successors.rend(); }
456 return (unsigned)Successors.size();
457 }
458 bool succ_empty() const { return Successors.empty(); }
459
472
473
474
475
476
477
483 LiveIns.push_back(RegMaskPair);
484 }
485
486
487
488
490
491
493
494
495
497
498
499
500
503
504
507
508
509
510
512
513
516
517
518
520
521
522
523
524
529
536
537
539
540 const std::vector &getLiveIns() const { return LiveIns; }
541
543 public:
549
551 MCRegister ExceptionSelector, bool End)
552 : ExceptionPointer(ExceptionPointer),
553 ExceptionSelector(ExceptionSelector), BlockI(MBB.succ_begin()),
555 if (End)
556 BlockI = BlockEnd;
557 else if (BlockI != BlockEnd) {
558 LiveRegI = (*BlockI)->livein_begin();
559 if (!advanceToValidPosition())
560 return;
561 if ((*BlockI)->isEHPad() && (LiveRegI->PhysReg == ExceptionPointer ||
562 LiveRegI->PhysReg == ExceptionSelector))
563 ++(*this);
564 }
565 }
566
568 do {
569 ++LiveRegI;
570 if (!advanceToValidPosition())
571 return *this;
572 } while ((*BlockI)->isEHPad() &&
573 (LiveRegI->PhysReg == ExceptionPointer ||
574 LiveRegI->PhysReg == ExceptionSelector));
575 return *this;
576 }
577
580 ++(*this);
581 return Tmp;
582 }
583
585 return *LiveRegI;
586 }
587
589 return &*LiveRegI;
590 }
591
593 if (BlockI != BlockEnd)
594 return BlockI == RHS.BlockI && LiveRegI == RHS.LiveRegI;
595 return RHS.BlockI == BlockEnd;
596 }
597
599 return !(*this == RHS);
600 }
601 private:
602 bool advanceToValidPosition() {
603 if (LiveRegI != (*BlockI)->livein_end())
604 return true;
605
606 do {
607 ++BlockI;
608 } while (BlockI != BlockEnd && (*BlockI)->livein_empty());
609 if (BlockI == BlockEnd)
610 return false;
611
612 LiveRegI = (*BlockI)->livein_begin();
613 return true;
614 }
615
616 MCRegister ExceptionPointer, ExceptionSelector;
620 };
621
622
623
624
632
633
634
637
638
639
642
643
645
646
648
653
654
656
657
659 MaxBytesForAlignment = MaxBytes;
660 }
661
662
663
664 bool isEHPad() const { return IsEHPad; }
665
666
667
669
671
672
674
675
676
678
679
680
682
683
685
686
688
689
691
692
694
695
697
698
700
701
703
704
706
708
710
711 std::optional getBBID() const { return BBID; }
712
713
715
716
718 assert(!BBID.has_value() && "Cannot change BBID.");
719 BBID = V;
720 }
721
722
724
725
727
728
729
730
732
733
735 return IsInlineAsmBrIndirectTarget;
736 }
737
738
740 IsInlineAsmBrIndirectTarget = V;
741 }
742
743
745
746
747
748
749
750
753
754
758
759
760
761
762
763
764
766
767
768
769
770
771
772
773
774
775
776
780
781
782
783
784
786
787
789
790
791
792
793
794
798
799
800
802
803
804
805
806
808 bool NormalizeSuccProbs = false);
809
810
811
812
813
814
816 bool NormalizeSuccProbs = false);
817
818
821
822
823
824
825
826
828
829
830
832 bool NormalizeSuccProbs = false);
833
834
835
836
838
839
840
842
843
845
846
848
849
851
852
853
854
855
856
858
859
860
861
864 return const_cast<MachineBasicBlock *>(
865 static_cast<const MachineBasicBlock *>(this)->getSingleSuccessor());
866 }
867
868
869
870
873 return const_cast<MachineBasicBlock *>(
874 static_cast<const MachineBasicBlock *>(this)->getSinglePredecessor());
875 }
876
877
878
879
880
881
883
884
885
886
888
889
890
891
892
893
895
896
897
898
899
900
903 return const_cast<MachineBasicBlock *>(this)->getFirstNonPHI();
904 }
905
906
907
908
910
911
912
913
914
917 bool SkipPseudoOp = true);
918
919
920
925
926
927
929
930
931
932
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
978
979
980
984
985
986
990
991
992
993
994
995
996
997
998
1000 bool UpdateLiveIns = true,
1002
1003
1004
1005
1006
1007
1014
1015 MachineBasicBlock *
1021
1029
1030
1032 MachineBasicBlock *Succ, const SplitCriticalEdgeAnalyses &Analyses,
1034
1038
1039
1040
1041
1042
1046
1050
1051
1052
1053
1054
1055
1056
1058
1059
1060 template
1062 assert((I == end() || I->getParent() == this) &&
1063 "iterator points outside of basic block");
1064 Insts.insert(I.getInstrIterator(), S, E);
1065 }
1066
1067
1069 assert((I == end() || I->getParent() == this) &&
1070 "iterator points outside of basic block");
1071 assert(->isBundledWithPred() &&
->isBundledWithSucc() &&
1072 "Cannot insert instruction with bundle flags");
1073 return Insts.insert(I.getInstrIterator(), MI);
1074 }
1075
1076
1078 assert((I == end() || I->getParent() == this) &&
1079 "iterator points outside of basic block");
1080 assert(->isBundledWithPred() &&
->isBundledWithSucc() &&
1081 "Cannot insert instruction with bundle flags");
1082 return Insts.insertAfter(I.getInstrIterator(), MI);
1083 }
1084
1085
1086
1089 "iterator points outside of basic block");
1090 assert(->isBundledWithPred() &&
->isBundledWithSucc() &&
1091 "Cannot insert instruction with bundle flags");
1092 while (I->isBundledWithSucc())
1093 ++I;
1094 return Insts.insertAfter(I, MI);
1095 }
1096
1097
1098
1099
1100
1102
1103
1104
1105
1106
1110
1111
1113 return Insts.erase(I.getInstrIterator(), E.getInstrIterator());
1114 }
1115
1116
1117
1118
1120 return erase(I, std::next(I));
1121 }
1122
1123
1124
1125
1126
1130
1131
1132
1133
1134
1135
1137 assert(->isBundled() && "Cannot remove bundled instructions");
1139 }
1140
1141
1142
1143
1144
1145
1147
1149 Insts.clear();
1150 }
1151
1152
1153
1154
1155
1157
1158 if (Where != From)
1159 splice(Where, Other, From, std::next(From));
1160 }
1161
1162
1163
1164
1165
1166
1172
1173
1174
1176
1177
1179
1180
1181
1184
1185
1186
1189
1190
1191
1196
1197
1198
1199
1204
1205
1206
1207
1212
1213
1214
1215
1216
1221
1222
1223
1225
1226
1232
1233
1234
1235
1236
1237
1238
1239
1240
1243 unsigned Neighborhood = 10) const;
1244
1245
1248 bool IsStandalone = true) const;
1251 bool IsStandalone = true) const;
1252
1257
1261
1262
1264
1265
1266
1269
1270
1272
1274
1275
1277
1278
1280
1282 return IrrLoopHeaderWeight;
1283 }
1284
1286 IrrLoopHeaderWeight = Weight;
1287 }
1288
1289
1290
1291
1293
1294
1296
1297
1298
1299
1300
1301
1302
1305
1306private:
1307
1308 probability_iterator getProbabilityIterator(succ_iterator I);
1309 const_probability_iterator
1311
1313
1314
1316
1317
1318
1319
1320
1321
1322 void addPredecessor(MachineBasicBlock *Pred);
1323
1324
1325
1326
1327 void removePredecessor(MachineBasicBlock *Pred);
1328};
1329
1331
1332
1333
1334
1335
1336
1337
1339
1340
1344 return MBB->getNumber();
1345 }
1346};
1347
1348
1349
1350
1351
1352
1353
1354
1355
1369
1371 "GraphTraits getNumber() not detected");
1372
1386
1388 "GraphTraits getNumber() not detected");
1389
1390
1391
1392
1393
1394
1395
1399
1401 return G.Graph;
1402 }
1403
1406
1411};
1412
1414 "GraphTraits getNumber() not detected");
1415
1419
1421 return G.Graph;
1422 }
1423
1426
1431};
1432
1434 "GraphTraits getNumber() not detected");
1435
1436
1447
1448
1449
1450
1451
1455
1456public:
1458 : MBB(*BB), I(I), B(I == MBB.begin() ? MBB.end() : std::prev(I)),
1459 E(std::next(I)) {
1460 assert(I == BB->end() || I->getParent() == BB);
1461 }
1462
1464 return B == MBB.end() ? MBB.begin() : std::next(B);
1465 }
1468
1470};
1471
1472
1473
1474
1475
1476template
1478 bool SkipPseudoOp = true) {
1479 while (It != End &&
1480 (It->isDebugInstr() || (SkipPseudoOp && It->isPseudoProbe())))
1481 ++It;
1482 return It;
1483}
1484
1485
1486
1487
1488
1489template
1491 bool SkipPseudoOp = true) {
1492 while (It != Begin &&
1493 (It->isDebugInstr() || (SkipPseudoOp && It->isPseudoProbe())))
1494 --It;
1495 return It;
1496}
1497
1498
1499
1500template
1501inline IterT next_nodbg(IterT It, IterT End, bool SkipPseudoOp = true) {
1503}
1504
1505
1506
1507template
1508inline IterT prev_nodbg(IterT It, IterT Begin, bool SkipPseudoOp = true) {
1510}
1511
1512
1513
1514template
1516 bool SkipPseudoOp = true) {
1518 return .isDebugInstr() && !(SkipPseudoOp && MI.isPseudoProbe());
1519 });
1520}
1521
1522}
1523
1524#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator MBBI
static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate any type of IT block"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow complex IT blocks")))
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines DenseMapInfo traits for DenseMap.
This file defines the little GraphTraits template class that should be specialized by classes that...
A common definition of LaneBitmask for use in TableGen and CodeGen.
Register const TargetRegisterInfo * TRI
Promote Memory to Register
This file defines the SparseBitVector class.
LLVM Basic Block Representation.
static BranchProbability getUnknown()
static void normalizeProbabilities(ProbabilityIter Begin, ProbabilityIter End)
Wrapper class representing physical registers. Should be passed by value.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
liveout_iterator & operator++()
Definition MachineBasicBlock.h:567
std::ptrdiff_t difference_type
Definition MachineBasicBlock.h:545
const RegisterMaskPair & reference
Definition MachineBasicBlock.h:548
reference operator*() const
Definition MachineBasicBlock.h:584
liveout_iterator(const MachineBasicBlock &MBB, MCRegister ExceptionPointer, MCRegister ExceptionSelector, bool End)
Definition MachineBasicBlock.h:550
const RegisterMaskPair * pointer
Definition MachineBasicBlock.h:547
std::input_iterator_tag iterator_category
Definition MachineBasicBlock.h:544
liveout_iterator operator++(int)
Definition MachineBasicBlock.h:578
bool operator==(const liveout_iterator &RHS) const
Definition MachineBasicBlock.h:592
RegisterMaskPair value_type
Definition MachineBasicBlock.h:546
pointer operator->() const
Definition MachineBasicBlock.h:588
bool operator!=(const liveout_iterator &RHS) const
Definition MachineBasicBlock.h:598
const MachineInstr & instr_front() const
Definition MachineBasicBlock.h:353
bool isInlineAsmBrIndirectTarget() const
Returns true if this is the indirect dest of an INLINEASM_BR.
Definition MachineBasicBlock.h:734
LLVM_ABI DebugLoc rfindPrevDebugLoc(reverse_instr_iterator MBBI)
Has exact same behavior as findPrevDebugLoc (it also searches towards the beginning of this MBB) exce...
Instructions::const_reverse_iterator const_reverse_instr_iterator
Definition MachineBasicBlock.h:339
pred_iterator pred_end()
Definition MachineBasicBlock.h:429
unsigned pred_size() const
Definition MachineBasicBlock.h:439
LLVM_ABI void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *FromMBB)
Transfers all the successors, as in transferSuccessors, and update PHI operands in the successor bloc...
LLVM_ABI bool hasEHPadSuccessor() const
void setBBID(const UniqueBBID &V)
Sets the fixed BBID of this basic block.
Definition MachineBasicBlock.h:717
bool empty() const
Definition MachineBasicBlock.h:349
iterator erase(MachineInstr *I)
Remove an instruction from the instruction list and delete it.
Definition MachineBasicBlock.h:1127
void normalizeSuccProbs()
Normalize probabilities of all successors so that the sum of them becomes one.
Definition MachineBasicBlock.h:795
void setAddressTakenIRBlock(BasicBlock *BB)
Set this block to reflect that it corresponds to an IR-level basic block with a BlockAddress.
Definition MachineBasicBlock.h:313
livein_iterator livein_end() const
Definition MachineBasicBlock.h:531
LLVM_ABI iterator getFirstTerminatorForward()
Finds the first terminator in a block by scanning forward.
void pop_back()
Definition MachineBasicBlock.h:1048
bool isEHPad() const
Returns true if the block is a landing pad.
Definition MachineBasicBlock.h:664
iterator_range< liveout_iterator > liveouts() const
Definition MachineBasicBlock.h:629
const MachineInstr & back() const
Definition MachineBasicBlock.h:359
LLVM_ABI void replacePhiUsesWith(MachineBasicBlock *Old, MachineBasicBlock *New)
Update all phi nodes in this basic block to refer to basic block New instead of basic block Old.
LLVM_ABI MachineInstr * remove_instr(MachineInstr *I)
Remove the possibly bundled instruction from the instruction list without deleting it.
instr_iterator instr_begin()
Definition MachineBasicBlock.h:361
void setIsEndSection(bool V=true)
Definition MachineBasicBlock.h:709
MachineInstrBundleIterator< const MachineInstr > const_iterator
Definition MachineBasicBlock.h:342
void setIrrLoopHeaderWeight(uint64_t Weight)
Definition MachineBasicBlock.h:1285
MachineBasicBlock * getLogicalFallThrough()
Return the fallthrough block if the block can implicitly transfer control to it's successor,...
Definition MachineBasicBlock.h:887
LLVM_ABI MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
void setIsCleanupFuncletEntry(bool V=true)
Indicates if this is the entry block of a cleanup funclet.
Definition MachineBasicBlock.h:699
DebugLoc rfindPrevDebugLoc(reverse_iterator MBBI)
Definition MachineBasicBlock.h:1218
const_pred_iterator pred_end() const
Definition MachineBasicBlock.h:430
LLVM_ABI void moveBefore(MachineBasicBlock *NewAfter)
Move 'this' block before or after the specified block.
void setLabelMustBeEmitted()
Set this block to reflect that, regardless how we flow to it, we need its label be emitted.
Definition MachineBasicBlock.h:320
reverse_iterator rend()
Definition MachineBasicBlock.h:387
void clear()
Definition MachineBasicBlock.h:1148
LLVM_ABI void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New)
Replace successor OLD with NEW and update probability info.
SmallVectorImpl< MachineBasicBlock * >::reverse_iterator succ_reverse_iterator
Definition MachineBasicBlock.h:423
const_pred_reverse_iterator pred_rend() const
Definition MachineBasicBlock.h:437
LLVM_ABI MachineBasicBlock * getFallThrough(bool JumpToFallThrough=true)
Return the fallthrough block if the block can implicitly transfer control to the block after it by fa...
LLVM_ABI void transferSuccessors(MachineBasicBlock *FromMBB)
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors Fr...
MachineBasicBlock * SplitCriticalEdge(MachineBasicBlock *Succ, Pass &P, std::vector< SparseBitVector<> > *LiveInSets=nullptr, MachineDomTreeUpdater *MDTU=nullptr)
Definition MachineBasicBlock.h:1016
bool hasLabelMustBeEmitted() const
Test whether this block must have its label emitted.
Definition MachineBasicBlock.h:316
const_iterator getFirstNonDebugInstr(bool SkipPseudoOp=true) const
Definition MachineBasicBlock.h:952
LLVM_ABI instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
LLVM_ABI BranchProbability getSuccProbability(const_succ_iterator Succ) const
Return probability of the edge from this block to MBB.
const_reverse_instr_iterator instr_rend() const
Definition MachineBasicBlock.h:368
iterator_range< livein_iterator > liveins() const
Definition MachineBasicBlock.h:533
void setAlignment(Align A, unsigned MaxBytes)
Definition MachineBasicBlock.h:649
iterator_range< iterator > phis()
Returns a range that iterates over the phis in the basic block.
Definition MachineBasicBlock.h:405
reverse_instr_iterator instr_rbegin()
Definition MachineBasicBlock.h:365
instr_iterator erase_instr(MachineInstr *I)
Remove an instruction from the instruction list and delete it.
Definition MachineBasicBlock.h:1107
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
Definition MachineBasicBlock.h:1267
void push_back(MachineInstr *MI)
Definition MachineBasicBlock.h:1049
LLVM_ABI iterator SkipPHIsAndLabels(iterator I)
Return the first instruction in MBB after I that is not a PHI or a label.
pred_reverse_iterator pred_rbegin()
Definition MachineBasicBlock.h:431
succ_iterator succ_end()
Definition MachineBasicBlock.h:445
LLVM_ABI void addSuccessorWithoutProb(MachineBasicBlock *Succ)
Add Succ as a successor of this MachineBasicBlock.
SmallVectorImpl< MachineBasicBlock * >::const_iterator const_succ_iterator
Definition MachineBasicBlock.h:417
instr_range instrs()
Definition MachineBasicBlock.h:372
SmallVectorImpl< MachineBasicBlock * >::const_reverse_iterator const_pred_reverse_iterator
Definition MachineBasicBlock.h:421
LLVM_ABI bool hasName() const
Check if there is a name of corresponding LLVM basic block.
MachineBasicBlock * getSinglePredecessor()
Definition MachineBasicBlock.h:872
void setCallFrameSize(unsigned N)
Set the call frame size on entry to this basic block.
Definition MachineBasicBlock.h:1273
std::optional< UniqueBBID > getBBID() const
Definition MachineBasicBlock.h:711
const BasicBlock * getBasicBlock() const
Return the LLVM basic block that this instance corresponded to originally.
Definition MachineBasicBlock.h:253
LLVM_ABI MCSymbol * getEHContSymbol() const
Return the Windows EH Continuation Symbol for this basic block.
LLVM_ABI void splitSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New, bool NormalizeSuccProbs=false)
Split the old successor into old plus new and updates the probability info.
liveout_iterator liveout_end() const
Definition MachineBasicBlock.h:626
const_instr_iterator instr_begin() const
Definition MachineBasicBlock.h:362
const_succ_iterator succ_begin() const
Definition MachineBasicBlock.h:444
const_succ_reverse_iterator succ_rbegin() const
Definition MachineBasicBlock.h:449
pred_reverse_iterator pred_rend()
Definition MachineBasicBlock.h:435
PrintNameFlag
Definition MachineBasicBlock.h:1253
@ PrintNameIr
Add IR name where available.
Definition MachineBasicBlock.h:1254
@ PrintNameAttributes
Print attributes.
Definition MachineBasicBlock.h:1255
LLVM_ABI void updateTerminator(MachineBasicBlock *PreviousLayoutSuccessor)
Update the terminator instructions in block to account for changes to block layout which may have bee...
LLVM_ABI const MachineBasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor.
LLVM_ABI iterator SkipPHIsLabelsAndDebug(iterator I, Register Reg=Register(), bool SkipPseudoOp=true)
Return the first instruction in MBB after I that is not a PHI, label or debug.
LLVM_ABI bool canFallThrough()
Return true if the block can implicitly transfer control to the block after it by falling off the end...
LLVM_ABI void setSuccProbability(succ_iterator I, BranchProbability Prob)
Set successor probability of a given iterator.
LLVM_ABI iterator getFirstNonDebugInstr(bool SkipPseudoOp=true)
Returns an iterator to the first non-debug instruction in the basic block, or end().
succ_iterator succ_begin()
Definition MachineBasicBlock.h:443
DebugLoc rfindDebugLoc(reverse_iterator MBBI)
Definition MachineBasicBlock.h:1201
bool livein_empty() const
Definition MachineBasicBlock.h:532
bool terminatorIsComputedGotoWithSuccessors() const
Returns true if the original IR terminator is an indirectbr with successor blocks.
Definition MachineBasicBlock.h:329
LLVM_ABI void removeLiveIn(MCRegister Reg, LaneBitmask LaneMask=LaneBitmask::getAll())
Remove the specified register from the live in set.
iterator erase(iterator I, iterator E)
Remove a range of instructions from the instruction list and delete them.
Definition MachineBasicBlock.h:1112
const MachineInstr & front() const
Definition MachineBasicBlock.h:358
LLVM_ABI void printAsOperand(raw_ostream &OS, bool PrintType=true) const
MachineInstr * remove(MachineInstr *I)
Remove the unbundled instruction from the instruction list without deleting it.
Definition MachineBasicBlock.h:1136
const_instr_range instrs() const
Definition MachineBasicBlock.h:373
const_reverse_iterator rbegin() const
Definition MachineBasicBlock.h:384
void clearBasicBlock()
Remove the reference to the underlying IR BasicBlock.
Definition MachineBasicBlock.h:257
unsigned getMaxBytesForAlignment() const
Return the maximum amount of padding allowed for aligning the basic block.
Definition MachineBasicBlock.h:655
void setMaxBytesForAlignment(unsigned MaxBytes)
Set the maximum amount of padding allowed for aligning the basic block.
Definition MachineBasicBlock.h:658
LLVM_ABI void validateSuccProbs() const
Validate successors' probabilities and check if the sum of them is approximate one.
iterator_range< const_pred_iterator > predecessors() const
Definition MachineBasicBlock.h:463
const MachineInstr & instr_back() const
Definition MachineBasicBlock.h:354
bool isIRBlockAddressTaken() const
Test whether this block is the target of an IR BlockAddress.
Definition MachineBasicBlock.h:301
LiveInVector::const_iterator livein_iterator
Definition MachineBasicBlock.h:519
LLVM_ABI MCSymbol * getEndSymbol() const
Returns the MCSymbol marking the end of this basic block.
void splice(iterator Where, MachineBasicBlock *Other, iterator From, iterator To)
Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB ...
Definition MachineBasicBlock.h:1167
LLVM_ABI void clearLiveIns()
Clear live in list.
bool isEHFuncletEntry() const
Returns true if this is the entry block of an EH funclet.
Definition MachineBasicBlock.h:690
const_iterator getLastNonDebugInstr(bool SkipPseudoOp=true) const
Definition MachineBasicBlock.h:974
LLVM_ABI LivenessQueryResult computeRegisterLiveness(const TargetRegisterInfo *TRI, MCRegister Reg, const_iterator Before, unsigned Neighborhood=10) const
Return whether (physical) register Reg has been defined and not killed as of just before Before.
LLVM_ABI iterator getFirstTerminator()
Returns an iterator to the first terminator instruction of this basic block.
bool sameSection(const MachineBasicBlock *MBB) const
Returns true if this and MBB belong to the same section.
Definition MachineBasicBlock.h:755
const std::vector< RegisterMaskPair > & getLiveIns() const
Definition MachineBasicBlock.h:540
iterator insert(iterator I, MachineInstr *MI)
Insert MI into the instruction list before I.
Definition MachineBasicBlock.h:1068
LLVM_ABI livein_iterator livein_begin() const
unsigned succ_size() const
Definition MachineBasicBlock.h:455
bool isReturnBlock() const
Convenience function that returns true if the block ends in a return instruction.
Definition MachineBasicBlock.h:981
iterator_range< livein_iterator > liveins_dbg() const
Definition MachineBasicBlock.h:526
LLVM_ABI const uint32_t * getBeginClobberMask(const TargetRegisterInfo *TRI) const
Get the clobber mask for the start of this basic block.
LLVM_ABI void removePHIsIncomingValuesForPredecessor(const MachineBasicBlock &PredMBB)
Iterate over block PHI instructions and remove all incoming values for PredMBB.
bool hasAddressTaken() const
Test whether this block is used as something other than the target of a terminator,...
Definition MachineBasicBlock.h:282
bool pred_empty() const
Definition MachineBasicBlock.h:442
void setNumber(int N)
Definition MachineBasicBlock.h:1268
MBBSectionID getSectionID() const
Returns the section ID of this basic block.
Definition MachineBasicBlock.h:714
void setAlignment(Align A)
Set alignment of the basic block.
Definition MachineBasicBlock.h:647
LLVM_ABI void dump() const
bool isEHScopeEntry() const
Returns true if this is the entry block of an EH scope, i.e., the block that used to have a catchpad ...
Definition MachineBasicBlock.h:677
MachineInstr & instr_back()
Definition MachineBasicBlock.h:352
LLVM_ABI bool isEntryBlock() const
Returns true if this is the entry block of the function.
iterator_range< const_instr_iterator > const_instr_range
Definition MachineBasicBlock.h:371
LLVM_ABI void addSuccessor(MachineBasicBlock *Succ, BranchProbability Prob=BranchProbability::getUnknown())
Add Succ as a successor of this MachineBasicBlock.
SmallVectorImpl< MachineBasicBlock * >::const_reverse_iterator const_succ_reverse_iterator
Definition MachineBasicBlock.h:425
LLVM_ABI void copySuccessor(const MachineBasicBlock *Orig, succ_iterator I)
Copy a successor (and any probability info) from original block to this block's.
SmallVectorImpl< MachineBasicBlock * >::iterator succ_iterator
Definition MachineBasicBlock.h:416
const_pred_reverse_iterator pred_rbegin() const
Definition MachineBasicBlock.h:433
void addLiveIn(const RegisterMaskPair &RegMaskPair)
Definition MachineBasicBlock.h:482
MachineBasicBlock * SplitCriticalEdge(MachineBasicBlock *Succ, MachineFunctionAnalysisManager &MFAM, std::vector< SparseBitVector<> > *LiveInSets=nullptr, MachineDomTreeUpdater *MDTU=nullptr)
Definition MachineBasicBlock.h:1023
MachineBasicBlock * getSingleSuccessor()
Definition MachineBasicBlock.h:863
BasicBlock * getAddressTakenIRBlock() const
Retrieves the BasicBlock which corresponds to this MachineBasicBlock.
Definition MachineBasicBlock.h:304
const_iterator getFirstNonPHI() const
Definition MachineBasicBlock.h:902
LLVM_ABI void sortUniqueLiveIns()
Sorts and uniques the LiveIns vector.
LLVM_ABI const MachineBasicBlock * getSingleSuccessor() const
Return the successor of this block if it has a single successor.
iterator_range< const_iterator > phis() const
Definition MachineBasicBlock.h:408
const_instr_iterator instr_end() const
Definition MachineBasicBlock.h:364
LLVM_ABI liveout_iterator liveout_begin() const
Iterator scanning successor basic blocks' liveins to determine the registers potentially live at the ...
DebugLoc findDebugLoc(iterator MBBI)
Definition MachineBasicBlock.h:1193
SmallVectorImpl< MachineBasicBlock * >::iterator pred_iterator
Definition MachineBasicBlock.h:413
LLVM_ABI void removeSuccessor(MachineBasicBlock *Succ, bool NormalizeSuccProbs=false)
Remove successor from the successors list of this MachineBasicBlock.
const_succ_iterator succ_end() const
Definition MachineBasicBlock.h:446
LLVM_ABI iterator getFirstNonPHI()
Returns a pointer to the first instruction in this block that is not a PHINode instruction.
const_iterator begin() const
Definition MachineBasicBlock.h:378
bool succ_empty() const
Definition MachineBasicBlock.h:458
LLVM_ABI bool isPredecessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB is a predecessor of this block.
bool hasSuccessorProbabilities() const
Return true if any of the successors have probabilities attached to them.
Definition MachineBasicBlock.h:844
void setSectionID(MBBSectionID V)
Sets the section ID for this basic block.
Definition MachineBasicBlock.h:723
iterator_range< const_iterator > terminators() const
Definition MachineBasicBlock.h:400
livein_iterator livein_begin_dbg() const
Unlike livein_begin, this method does not check that the liveness information is accurate.
Definition MachineBasicBlock.h:525
LLVM_ABI DebugLoc rfindDebugLoc(reverse_instr_iterator MBBI)
Has exact same behavior as findDebugLoc (it also searches towards the end of this MBB) except that th...
iterator begin()
Definition MachineBasicBlock.h:377
const_pred_iterator pred_begin() const
Definition MachineBasicBlock.h:428
LLVM_ABI void print(raw_ostream &OS, const SlotIndexes *=nullptr, bool IsStandalone=true) const
reverse_instr_iterator instr_rend()
Definition MachineBasicBlock.h:367
const_reverse_iterator rend() const
Definition MachineBasicBlock.h:388
LLVM_ABI DebugLoc findDebugLoc(instr_iterator MBBI)
Find the next valid DebugLoc starting at MBBI, skipping any debug instructions.
Instructions::iterator instr_iterator
Definition MachineBasicBlock.h:336
pred_iterator pred_begin()
Definition MachineBasicBlock.h:427
LLVM_ABI iterator getLastNonDebugInstr(bool SkipPseudoOp=true)
Returns an iterator to the last non-debug instruction in the basic block, or end().
LLVM_ABI void ReplaceUsesOfBlockWith(MachineBasicBlock *Old, MachineBasicBlock *New)
Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'N...
MachineInstrBundleIterator< MachineInstr, true > reverse_iterator
Definition MachineBasicBlock.h:343
succ_reverse_iterator succ_rbegin()
Definition MachineBasicBlock.h:447
LLVM_ABI bool isLayoutSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB will be emitted immediately after this block, such that if this bloc...
static Instructions MachineBasicBlock::* getSublistAccess(MachineInstr *)
Support for MachineInstr::getNextNode().
Definition MachineBasicBlock.h:393
LLVM_ABI DebugLoc findPrevDebugLoc(instr_iterator MBBI)
Find the previous valid DebugLoc preceding MBBI, skipping any debug instructions.
LLVM_ABI MachineBasicBlock * splitAt(MachineInstr &SplitInst, bool UpdateLiveIns=true, LiveIntervals *LIS=nullptr)
Split a basic block into 2 pieces at SplitPoint.
MachineFunction * getParent()
Definition MachineBasicBlock.h:324
LLVM_ABI bool canSplitCriticalEdge(const MachineBasicBlock *Succ, const MachineLoopInfo *MLI=nullptr) const
Check if the edge between this block and the given successor Succ, can be split.
LLVM_ABI void eraseFromParent()
This method unlinks 'this' from the containing function and deletes it.
friend class MachineFunction
Definition MachineBasicBlock.h:247
LLVM_ABI void removeLiveInOverlappedWith(MCRegister Reg)
Remove the specified register from any overlapped live in.
void setIsInlineAsmBrIndirectTarget(bool V=true)
Indicates if this is the indirect dest of an INLINEASM_BR.
Definition MachineBasicBlock.h:739
instr_iterator instr_end()
Definition MachineBasicBlock.h:363
iterator end()
Definition MachineBasicBlock.h:379
Instructions::const_iterator const_instr_iterator
Definition MachineBasicBlock.h:337
iterator_range< const_succ_iterator > successors() const
Definition MachineBasicBlock.h:469
void addLiveIn(MCRegister PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
Definition MachineBasicBlock.h:478
const_iterator getFirstTerminator() const
Definition MachineBasicBlock.h:922
const_succ_reverse_iterator succ_rend() const
Definition MachineBasicBlock.h:453
MachineInstr & back()
Definition MachineBasicBlock.h:357
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
Definition MachineBasicBlock.h:323
void setIsEHContTarget(bool V=true)
Indicates if this is a target of Windows EH Continuation Guard.
Definition MachineBasicBlock.h:687
LLVM_ABI instr_iterator erase(instr_iterator I)
Remove an instruction from the instruction list and delete it.
LLVM_ABI std::string getFullName() const
Return a formatted string to identify this block and its parent function.
bool isBeginSection() const
Returns true if this block begins any section.
Definition MachineBasicBlock.h:702
DebugLoc findPrevDebugLoc(iterator MBBI)
Definition MachineBasicBlock.h:1209
iterator_range< iterator > terminators()
Definition MachineBasicBlock.h:397
bool isEHContTarget() const
Returns true if this is a target of Windows EH Continuation Guard.
Definition MachineBasicBlock.h:684
unsigned getCallFrameSize() const
Return the call frame size on entry to this basic block.
Definition MachineBasicBlock.h:1271
void setIsEHFuncletEntry(bool V=true)
Indicates if this is the entry block of an EH funclet.
Definition MachineBasicBlock.h:693
friend class MachineBranchProbabilityInfo
Definition MachineBasicBlock.h:1312
LLVM_ABI DebugLoc findBranchDebugLoc()
Find and return the merged DebugLoc of the branch instructions of the block.
iterator_range< succ_iterator > successors()
Definition MachineBasicBlock.h:466
LLVM_ABI instr_iterator getFirstInstrTerminator()
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.
reverse_iterator rbegin()
Definition MachineBasicBlock.h:381
bool isMachineBlockAddressTaken() const
Test whether this block is used as something other than the target of a terminator,...
Definition MachineBasicBlock.h:294
LLVM_ABI void printName(raw_ostream &os, unsigned printNameFlags=PrintNameIr, ModuleSlotTracker *moduleSlotTracker=nullptr) const
Print the basic block's name as:
iterator insertAfter(iterator I, MachineInstr *MI)
Insert MI into the instruction list after I.
Definition MachineBasicBlock.h:1077
unsigned size() const
Definition MachineBasicBlock.h:347
SmallVectorImpl< MachineBasicBlock * >::reverse_iterator pred_reverse_iterator
Definition MachineBasicBlock.h:419
LLVM_ABI bool isSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB is a successor of this block.
iterator_range< pred_iterator > predecessors()
Definition MachineBasicBlock.h:460
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before '...
Definition MachineBasicBlock.h:1156
bool isEHScopeReturnBlock() const
Convenience function that returns true if the bock ends in a EH scope return instruction.
Definition MachineBasicBlock.h:987
bool isEndSection() const
Returns true if this block ends any section.
Definition MachineBasicBlock.h:705
Align getAlignment() const
Return alignment of the basic block.
Definition MachineBasicBlock.h:644
MachineInstrBundleIterator< MachineInstr > iterator
Definition MachineBasicBlock.h:341
LLVM_ABI bool isLegalToHoistInto() const
Returns true if it is legal to hoist instructions into this block.
MachineInstr & instr_front()
Definition MachineBasicBlock.h:351
LLVM_ABI bool canPredictBranchProbabilities() const
const_reverse_instr_iterator instr_rbegin() const
Definition MachineBasicBlock.h:366
iterator erase(iterator I)
Remove an instruction or bundle from the instruction list and delete it.
Definition MachineBasicBlock.h:1119
instr_iterator insertAfterBundle(instr_iterator I, MachineInstr *MI)
If I is bundled then insert MI into the instruction list after the end of the bundle,...
Definition MachineBasicBlock.h:1087
const_iterator end() const
Definition MachineBasicBlock.h:380
LLVM_ABI StringRef getName() const
Return the name of the corresponding LLVM basic block, or an empty string.
MachineInstr & front()
Definition MachineBasicBlock.h:356
LLVM_ABI bool mayHaveInlineAsmBr() const
Returns true if this block may have an INLINEASM_BR (overestimate, by checking if any of the successo...
LivenessQueryResult
Possible outcome of a register liveness query to computeRegisterLiveness()
Definition MachineBasicBlock.h:1227
@ LQR_Dead
Register is known to be fully dead.
Definition MachineBasicBlock.h:1229
@ LQR_Live
Register is known to be (at least partially) live.
Definition MachineBasicBlock.h:1228
@ LQR_Unknown
Register liveness not decidable from local neighborhood.
Definition MachineBasicBlock.h:1230
MachineInstrBundleIterator< const MachineInstr, true > const_reverse_iterator
Definition MachineBasicBlock.h:344
SmallVectorImpl< MachineBasicBlock * >::const_iterator const_pred_iterator
Definition MachineBasicBlock.h:414
void setIsEHScopeEntry(bool V=true)
Indicates if this is the entry block of an EH scope, i.e., the block that that used to have a catchpa...
Definition MachineBasicBlock.h:681
LLVM_ABI void moveAfter(MachineBasicBlock *NewBefore)
succ_reverse_iterator succ_rend()
Definition MachineBasicBlock.h:451
void setMachineBlockAddressTaken()
Set this block to indicate that its address is used as something other than the target of a terminato...
Definition MachineBasicBlock.h:309
std::optional< uint64_t > getIrrLoopHeaderWeight() const
Definition MachineBasicBlock.h:1281
LLVM_ABI const uint32_t * getEndClobberMask(const TargetRegisterInfo *TRI) const
Get the clobber mask for the end of the basic block.
void setIsBeginSection(bool V=true)
Definition MachineBasicBlock.h:707
LLVM_ABI bool sizeWithoutDebugLargerThan(unsigned Limit) const
iterator_range< instr_iterator > instr_range
Definition MachineBasicBlock.h:370
void pop_front()
Definition MachineBasicBlock.h:1047
LLVM_ABI bool isLiveIn(MCRegister Reg, LaneBitmask LaneMask=LaneBitmask::getAll()) const
Return true if the specified register is in the live in set.
LLVM_ABI MachineBasicBlock * removeFromParent()
This method unlinks 'this' from the containing function, and returns it, but does not delete it.
void insert(iterator I, IT S, IT E)
Insert a range of instructions into the instruction list before I.
Definition MachineBasicBlock.h:1061
void setIsEHPad(bool V=true)
Indicates the block is a landing pad.
Definition MachineBasicBlock.h:668
Instructions::reverse_iterator reverse_instr_iterator
Definition MachineBasicBlock.h:338
bool isCleanupFuncletEntry() const
Returns true if this is the entry block of a cleanup funclet.
Definition MachineBasicBlock.h:696
MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i....
instr_iterator getInstrIterator() const
static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI)
MachineBasicBlock::iterator getInitial()
Definition MachineBasicBlock.h:1469
MachineInstrSpan(MachineBasicBlock::iterator I, MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1457
MachineBasicBlock::iterator begin()
Definition MachineBasicBlock.h:1463
bool empty()
Definition MachineBasicBlock.h:1467
MachineBasicBlock::iterator end()
Definition MachineBasicBlock.h:1466
Representation of each machine instruction.
bool isReturn(QueryType Type=AnyInBundle) const
bool isEHScopeReturn(QueryType Type=AnyInBundle) const
Return true if this is an instruction that marks the end of an EH scope, i.e., a catchpad or a cleanu...
bool isIndirectBranch(QueryType Type=AnyInBundle) const
Return true if this is an indirect branch, such as a branch through a register.
Manage lifetime of a slot tracker for printing IR.
Pass interface - Implemented by all 'passes'.
Simple wrapper around std::function<void(raw_ostream&)>.
Wrapper class representing virtual and physical registers.
typename SuperClass::const_iterator const_iterator
typename SuperClass::iterator iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
The instances of the Type class are immutable: once they are created, they are never changed.
ilist_node_with_parent()=default
typename base_list_type::const_reverse_iterator const_reverse_iterator
typename base_list_type::reverse_iterator reverse_iterator
typename base_list_type::iterator iterator
typename base_list_type::const_iterator const_iterator
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
A simple intrusive list implementation.
This file defines classes to implement an intrusive doubly linked list class (i.e.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
unsigned combineHashValue(unsigned a, unsigned b)
Simplistic combination of 32-bit hash values into 32-bit hash values.
This is an optimization pass for GlobalISel generic memory operations.
IterT next_nodbg(IterT It, IterT End, bool SkipPseudoOp=true)
Increment It, then continue incrementing it while it points to a debug instruction.
Definition MachineBasicBlock.h:1501
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
auto pred_end(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1446
auto successors(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1437
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
constexpr bool GraphHasNodeNumbers
Indicate whether a GraphTraits::getNumber() is supported.
auto pred_size(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1442
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
IterT skipDebugInstructionsForward(IterT It, IterT End, bool SkipPseudoOp=true)
Increment It until it points to a non-debug instruction or to End and return the resulting iterator.
Definition MachineBasicBlock.h:1477
iplist< T, Options... > ilist
auto succ_size(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1441
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
auto instructionsWithoutDebug(IterT It, IterT End, bool SkipPseudoOp=true)
Construct a range iterator which begins at It and moves forwards until End is reached,...
Definition MachineBasicBlock.h:1515
IterT skipDebugInstructionsBackward(IterT It, IterT Begin, bool SkipPseudoOp=true)
Decrement It until it points to a non-debug instruction or to Begin and return the resulting iterator...
Definition MachineBasicBlock.h:1490
RNSuccIterator< NodeRef, BlockT, RegionT > succ_begin(NodeRef Node)
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
RNSuccIterator< NodeRef, BlockT, RegionT > succ_end(NodeRef Node)
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
auto pred_begin(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1444
auto predecessors(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1438
SuccIterator< Instruction, BasicBlock > succ_iterator
SuccIterator< const Instruction, const BasicBlock > const_succ_iterator
IterT prev_nodbg(IterT It, IterT Begin, bool SkipPseudoOp=true)
Decrement It, then continue decrementing it while it points to a debug instruction.
Definition MachineBasicBlock.h:1508
LLVM_ABI Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
DenseMapInfo< unsigned > NumberInfo
Definition MachineBasicBlock.h:86
static MBBSectionID getEmptyKey()
Definition MachineBasicBlock.h:88
static unsigned getHashValue(const MBBSectionID &SecID)
Definition MachineBasicBlock.h:94
DenseMapInfo< MBBSectionID::SectionType > TypeInfo
Definition MachineBasicBlock.h:85
static bool isEqual(const MBBSectionID &LHS, const MBBSectionID &RHS)
Definition MachineBasicBlock.h:98
static MBBSectionID getTombstoneKey()
Definition MachineBasicBlock.h:91
An information struct used to provide DenseMap with the various necessary components for a given valu...
static ChildIteratorType child_end(NodeRef N)
Definition MachineBasicBlock.h:1405
static NodeRef getEntryNode(Inverse< MachineBasicBlock * > G)
Definition MachineBasicBlock.h:1400
MachineBasicBlock * NodeRef
Definition MachineBasicBlock.h:1397
MachineBasicBlock::pred_iterator ChildIteratorType
Definition MachineBasicBlock.h:1398
static unsigned getNumber(MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1407
static ChildIteratorType child_begin(NodeRef N)
Definition MachineBasicBlock.h:1404
static ChildIteratorType child_end(NodeRef N)
Definition MachineBasicBlock.h:1425
static unsigned getNumber(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1427
const MachineBasicBlock * NodeRef
Definition MachineBasicBlock.h:1417
static NodeRef getEntryNode(Inverse< const MachineBasicBlock * > G)
Definition MachineBasicBlock.h:1420
static ChildIteratorType child_begin(NodeRef N)
Definition MachineBasicBlock.h:1424
MachineBasicBlock::const_pred_iterator ChildIteratorType
Definition MachineBasicBlock.h:1418
static unsigned getNumber(MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1364
MachineBasicBlock * NodeRef
Definition MachineBasicBlock.h:1357
MachineBasicBlock::succ_iterator ChildIteratorType
Definition MachineBasicBlock.h:1358
static NodeRef getEntryNode(MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1360
static ChildIteratorType child_end(NodeRef N)
Definition MachineBasicBlock.h:1362
static ChildIteratorType child_begin(NodeRef N)
Definition MachineBasicBlock.h:1361
MachineBasicBlock::const_succ_iterator ChildIteratorType
Definition MachineBasicBlock.h:1375
static ChildIteratorType child_begin(NodeRef N)
Definition MachineBasicBlock.h:1378
static unsigned getNumber(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1381
static NodeRef getEntryNode(const MachineBasicBlock *BB)
Definition MachineBasicBlock.h:1377
static ChildIteratorType child_end(NodeRef N)
Definition MachineBasicBlock.h:1379
const MachineBasicBlock * NodeRef
Definition MachineBasicBlock.h:1374
static constexpr LaneBitmask getAll()
unsigned operator()(const MachineBasicBlock *MBB) const
Definition MachineBasicBlock.h:1343
const MachineBasicBlock * argument_type
Definition MachineBasicBlock.h:1342
Definition MachineBasicBlock.h:58
bool operator!=(const MBBSectionID &Other) const
Definition MachineBasicBlock.h:77
LLVM_ABI static const MBBSectionID ExceptionSectionID
Definition MachineBasicBlock.h:71
unsigned Number
Definition MachineBasicBlock.h:65
LLVM_ABI static const MBBSectionID ColdSectionID
Definition MachineBasicBlock.h:70
MBBSectionID(unsigned N)
Definition MachineBasicBlock.h:67
enum llvm::MBBSectionID::SectionType Type
SectionType
Definition MachineBasicBlock.h:59
@ Cold
Definition MachineBasicBlock.h:63
@ Exception
Definition MachineBasicBlock.h:62
@ Default
Definition MachineBasicBlock.h:60
bool operator==(const MBBSectionID &Other) const
Definition MachineBasicBlock.h:73
Pair of physical register and lane mask.
Definition MachineBasicBlock.h:127
RegisterMaskPair(MCRegister PhysReg, LaneBitmask LaneMask)
Definition MachineBasicBlock.h:132
bool operator==(const RegisterMaskPair &other) const
Definition MachineBasicBlock.h:135
LaneBitmask LaneMask
Definition MachineBasicBlock.h:130
MCRegister PhysReg
Definition MachineBasicBlock.h:129
Split the critical edge from this block to the given successor block, and return the newly created bl...
Definition MachineBasicBlock.h:1008
SlotIndexes * SI
Definition MachineBasicBlock.h:1010
LiveIntervals * LIS
Definition MachineBasicBlock.h:1009
LiveVariables * LV
Definition MachineBasicBlock.h:1011
MachineLoopInfo * MLI
Definition MachineBasicBlock.h:1012
Callbacks do nothing by default in iplist and ilist.
friend class MachineBasicBlock
Definition MachineBasicBlock.h:105
LLVM_ABI void addNodeToList(MachineInstr *N)
LLVM_ABI void transferNodesFromList(ilist_traits &FromList, instr_iterator First, instr_iterator Last)
LLVM_ABI void removeNodeFromList(MachineInstr *N)
LLVM_ABI void deleteNode(MachineInstr *MI)
Template traits for intrusive list.