LLVM: include/llvm/IR/Instruction.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_IR_INSTRUCTION_H
15#define LLVM_IR_INSTRUCTION_H
16
27#include
28#include
29
30namespace llvm {
31
41
45
48
53
54public:
57 "BasicBlock::iterator")
62 bool isValid() const { return InsertAt.isValid(); }
64};
65
68 ilist_iterator_bits,
69 ilist_parent> {
70public:
73
74private:
75 DebugLoc DbgLoc;
76
77
78
79 mutable unsigned Order = 0;
80
81public:
82
83
84
86
87
88
89
90
91
92
93
94
95
96
97
98
102 bool InsertAtHead = false);
103
104
108
109
110
111
112 LLVM_ABI std::optional<simple_ilist::iterator>
113 getDbgReinsertionPosition();
114
115
116 LLVM_ABI bool hasDbgRecords() const;
117
118
119
120
121 LLVM_ABI void adoptDbgRecords(BasicBlock *BB, InstListType::iterator It,
122 bool InsertAtHead);
123
124
125 LLVM_ABI void dropDbgRecords();
126
127
129
130
131
132 LLVM_ABI void handleMarkerRemoval();
133
134protected:
135
136
138
139
140
141
142
143
144 template
148
149 template
151
152 template
156
157private:
158
159
161
162protected:
163 LLVM_ABI ~Instruction();
164
165public:
168
169
170
173
174
175
176
177
178
181 return const_cast<Module *>(
182 static_cast<const Instruction *>(this)->getModule());
183 }
184
185
186
187
188
191 return const_cast<Function *>(
192 static_cast<const Instruction *>(this)->getFunction());
193 }
194
195
196
197
199
200
201
202 LLVM_ABI void removeFromParent();
203
204
205
206
207 LLVM_ABI InstListType::iterator eraseFromParent();
208
209
210
211
212
213
214
215
218
219
220
222
223
224
226
227
228
230
231
232
235
237
238
239
240
241
242
243
244
247
248
249
251
252
253
254
256
257
258
259
261
262
263
264
265
266
267
270
271private:
272
273
275
276public:
277
278
279
281
282
283
285
286
287
289
290
292
293
294
295
296
297
299
300
301
302
303
304
306
307
308
309
310
311
313
324
325
326
327 LLVM_ABI bool isOnlyUserOfAnyOperand();
328
330
332 return Opcode >= TermOpsBegin && Opcode < TermOpsEnd;
333 }
334
335 static inline bool isUnaryOp(unsigned Opcode) {
336 return Opcode >= UnaryOpsBegin && Opcode < UnaryOpsEnd;
337 }
339 return Opcode >= BinaryOpsBegin && Opcode < BinaryOpsEnd;
340 }
341
343 return Opcode == UDiv || Opcode == SDiv || Opcode == URem || Opcode == SRem;
344 }
345
347 return Opcode == FDiv || Opcode == FRem;
348 }
349
350
351 static inline bool isShift(unsigned Opcode) {
352 return Opcode >= Shl && Opcode <= AShr;
353 }
354
355
359
360
364
365
367 return Opcode == And || Opcode == Or || Opcode == Xor;
368 }
369
370
374
375
376 static inline bool isCast(unsigned Opcode) {
377 return Opcode >= CastOpsBegin && Opcode < CastOpsEnd;
378 }
379
380
382 return Opcode >= FuncletPadOpsBegin && Opcode < FuncletPadOpsEnd;
383 }
384
385
386
388 switch (Opcode) {
389 case Instruction::CatchSwitch:
390 case Instruction::CatchRet:
391 case Instruction::CleanupRet:
392 case Instruction::Invoke:
393 case Instruction::Resume:
394 case Instruction::CallBr:
395 return true;
396 default:
397 return false;
398 }
399 }
400
401
402
403
404
405
407
408
409
410 LLVM_ABI bool hasNonDebugLocLoopMetadata() const;
411
412
413
415
416
420
421
425
426
427
429
430 if (KindID == LLVMContext::MD_dbg)
431 return DbgLoc.getAsMDNode();
433 }
434
435
436
439 return getMetadataImpl(Kind);
440 }
441
442
443
444
445 void
448 getAllMetadataImpl(MDs);
449 }
450
451
452
457
458
459
462
463
464
465
468
469
471
472
473
474
475 LLVM_ABI void swapProfMetadata();
476
477
478
479
480
481
482
484
485
486
487
488
489 LLVM_ABI void addAnnotationMetadata(StringRef Annotation);
490
491
492
493
494 LLVM_ABI void addAnnotationMetadata(SmallVector Annotations);
495
496 LLVM_ABI AAMDNodes getAAMetadata() const;
497
498
499 LLVM_ABI void setAAMetadata(const AAMDNodes &N);
500
501
502 LLVM_ABI void setNoSanitizeMetadata();
503
504
505
506
507 LLVM_ABI bool extractProfTotalWeight(uint64_t &TotalVal) const;
508
509
511
512
514
515
516
518
519
520
521 LLVM_ABI void setHasNoUnsignedWrap(bool b = true);
522
523
524
525 LLVM_ABI void setHasNoSignedWrap(bool b = true);
526
527
528
529 LLVM_ABI void setIsExact(bool b = true);
530
531
532
533 LLVM_ABI void setNonNeg(bool b = true);
534
535
537
538
540
541
543
544
545
547
548
549
550 LLVM_ABI void dropPoisonGeneratingFlags();
551
552
554
555
556 LLVM_ABI void dropPoisonGeneratingMetadata();
557
558
560
561
562 LLVM_ABI void dropPoisonGeneratingReturnAttributes();
563
564
565
571
572
578
579
580
581
582
584 dropUBImplyingAttrsAndUnknownMetadata(ArrayRef KnownIDs = {});
585
586
587
588
589
590 LLVM_ABI void dropUBImplyingAttrsAndMetadata(ArrayRef Keep = {});
591
592
593
595
596
598
599
600
601
603
604
605
606
607 LLVM_ABI void setHasAllowReassoc(bool B);
608
609
610
611
612 LLVM_ABI void setHasNoNaNs(bool B);
613
614
615
616
617 LLVM_ABI void setHasNoInfs(bool B);
618
619
620
621
622 LLVM_ABI void setHasNoSignedZeros(bool B);
623
624
625
626
627 LLVM_ABI void setHasAllowReciprocal(bool B);
628
629
630
631
632 LLVM_ABI void setHasAllowContract(bool B);
633
634
635
636
637 LLVM_ABI void setHasApproxFunc(bool B);
638
639
640
641
642 LLVM_ABI void setFastMathFlags(FastMathFlags FMF);
643
644
645
646
647 LLVM_ABI void copyFastMathFlags(FastMathFlags FMF);
648
649
651
652
654
655
657
658
660
661
663
664
666
667
669
670
672
673
674
675
677
678
679 LLVM_ABI void copyFastMathFlags(const Instruction *I);
680
681
682
683 LLVM_ABI void copyIRFlags(const Value *V, bool IncludeWrapFlags = true);
684
685
686
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702 LLVM_ABI void applyMergedLocation(DebugLoc LocA, DebugLoc LocB);
703
704
705
706
707
708 LLVM_ABI void updateLocationAfterHoist();
709
710
711
712
713
714
715
716 LLVM_ABI void dropLocation();
717
718
719
720
721
722
723
724
725
726
728 mergeDIAssignID(ArrayRef<const Instruction *> SourceInstructions);
729
730private:
731
732 LLVM_ABI MDNode *getMetadataImpl(StringRef Kind) const;
734 getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned, MDNode *>> &) const;
735
736
737
738 void updateDIAssignIDMapping(DIAssignID *ID);
739
740public:
741
742
743
744
745
746
747
748
749
750
753 return Opcode == And || Opcode == Or || Opcode == Xor ||
754 Opcode == Add || Opcode == Mul;
755 }
756
757
758
759
760
761
762
763
766 switch (Opcode) {
770 return true;
771 default:
772 return false;
773 }
774 }
775
776
777
778
779
780
781
784 return Opcode == And || Opcode == Or;
785 }
786
787
788
789
790
791
792
793
794
795
798 return Opcode == Xor;
799 }
800
801
803
804
806
807
811
812
813
815
816
818
819
821
822
824
825
827
828
829
830
831
832
835
836
837
840 default:
841 return false;
842
843
844 case Instruction::Fence:
845 case Instruction::CatchPad:
846 case Instruction::CatchRet:
847 case Instruction::Call:
848 case Instruction::Invoke:
849 return true;
850 }
851 }
852
853
854
855
856
857
858
859
860
861
862
863
865
866
867
868
869
870
871
873
874
875
877
878
881 case Instruction::CatchSwitch:
882 case Instruction::CatchPad:
883 case Instruction::CleanupPad:
884 case Instruction::LandingPad:
885 return true;
886 default:
887 return false;
888 }
889 }
890
891
892
894
895
896
898
899
901
902
903
904
905
906
908
909
910
911
913
914
915
916
920
921
922
932
933
934
935
936
937
938
939
940
943
944
945
946
947
948
949
950
951
955
956
957
958
960
961
962
964
965
967
968
969
971
972
973
975
976
978 return V->getValueID() >= Value::InstructionVal;
979 }
980
981
982
983
985#define FIRST_TERM_INST(N) TermOpsBegin = N,
986#define HANDLE_TERM_INST(N, OPC, CLASS) OPC = N,
987#define LAST_TERM_INST(N) TermOpsEnd = N+1
988#include "llvm/IR/Instruction.def"
989 };
990
992#define FIRST_UNARY_INST(N) UnaryOpsBegin = N,
993#define HANDLE_UNARY_INST(N, OPC, CLASS) OPC = N,
994#define LAST_UNARY_INST(N) UnaryOpsEnd = N+1
995#include "llvm/IR/Instruction.def"
996 };
997
999#define FIRST_BINARY_INST(N) BinaryOpsBegin = N,
1000#define HANDLE_BINARY_INST(N, OPC, CLASS) OPC = N,
1001#define LAST_BINARY_INST(N) BinaryOpsEnd = N+1
1002#include "llvm/IR/Instruction.def"
1003 };
1004
1006#define FIRST_MEMORY_INST(N) MemoryOpsBegin = N,
1007#define HANDLE_MEMORY_INST(N, OPC, CLASS) OPC = N,
1008#define LAST_MEMORY_INST(N) MemoryOpsEnd = N+1
1009#include "llvm/IR/Instruction.def"
1010 };
1011
1013#define FIRST_CAST_INST(N) CastOpsBegin = N,
1014#define HANDLE_CAST_INST(N, OPC, CLASS) OPC = N,
1015#define LAST_CAST_INST(N) CastOpsEnd = N+1
1016#include "llvm/IR/Instruction.def"
1017 };
1018
1020#define FIRST_FUNCLETPAD_INST(N) FuncletPadOpsBegin = N,
1021#define HANDLE_FUNCLETPAD_INST(N, OPC, CLASS) OPC = N,
1022#define LAST_FUNCLETPAD_INST(N) FuncletPadOpsEnd = N+1
1023#include "llvm/IR/Instruction.def"
1024 };
1025
1027#define FIRST_OTHER_INST(N) OtherOpsBegin = N,
1028#define HANDLE_OTHER_INST(N, OPC, CLASS) OPC = N,
1029#define LAST_OTHER_INST(N) OtherOpsEnd = N+1
1030#include "llvm/IR/Instruction.def"
1031 };
1032
1033private:
1034 friend class SymbolTableListTraits<Instruction, ilist_iterator_bits<true>,
1037
1038
1039
1040 void setValueSubclassData(unsigned short D) {
1042 }
1043
1044 unsigned short getSubclassDataFromValue() const {
1046 }
1047
1048protected:
1049
1050
1051
1052 template
1054 static_assert(
1055 std::is_same<BitfieldElement, HasMetadataField>::value ||
1057 "Must not overlap with the metadata bit");
1059 }
1060
1061 template
1063 static_assert(
1064 std::is_same<BitfieldElement, HasMetadataField>::value ||
1066 "Must not overlap with the metadata bit");
1067 auto Storage = getSubclassDataFromValue();
1069 setValueSubclassData(Storage);
1070 }
1071
1074
1075private:
1076
1078};
1079
1081 V->deleteValue();
1082}
1083
1084}
1085
1086#endif
Atomic ordering constants.
This file implements methods to test, set and extract typed bits from packed unsigned integers.
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static StringRef getOpcodeName(uint8_t Opcode, uint8_t OpcodeBase)
static bool hasNoSignedWrap(BinaryOperator &I)
static bool hasNoUnsignedWrap(BinaryOperator &I)
static MemAccessTy getAccessType(const TargetTransformInfo &TTI, Instruction *Inst, Value *OperandVal)
Return the type of the memory being accessed.
static bool mayHaveSideEffects(MachineInstr &MI)
static bool isCommutative(Instruction *I, Value *ValWithUses, bool IsCopyable=false)
static std::optional< unsigned > getOpcode(ArrayRef< VPValue * > Values)
Returns the opcode of Values or ~0 if they do not all agree.
static Function * getFunction(FunctionType *Ty, const Twine &Name, Module *M)
static bool isAssociative(const COFFSection &Section)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
LLVM Basic Block Representation.
A parsed version of the target data layout string in and methods for querying it.
Per-instruction record of debug-info.
Base class for non-instruction debug metadata records that have positions within IR.
Convenience struct for specifying and reasoning about fast-math flags.
Definition Instruction.h:49
bool isValid() const
Definition Instruction.h:62
BasicBlock * getBasicBlock()
Definition Instruction.h:63
InsertPosition(std::nullptr_t)
Definition Instruction.h:55
LLVM_ABI LLVM_DEPRECATED("Use BasicBlock::iterators for insertion instead", "BasicBlock::iterator") InsertPosition(Instruction *InsertBefore)
operator InstListType::iterator() const
Definition Instruction.h:61
Definition Instruction.h:69
DbgMarker * DebugMarker
Optional marker recording the position for debugging information that takes effect immediately before...
Definition Instruction.h:85
BitfieldElement::Type getSubclassData() const
Definition Instruction.h:1053
typename Bitfield::Element< unsigned, Offset, 6, Value::MaxAlignmentExponent > AlignmentBitfieldElementT
Definition Instruction.h:145
MemoryOps
Definition Instruction.h:1005
bool hasMetadata(unsigned KindID) const
Return true if this instruction has the given type of metadata attached.
Definition Instruction.h:417
static bool isBinaryOp(unsigned Opcode)
Definition Instruction.h:338
bool isArithmeticShift() const
Return true if this is an arithmetic shift right.
Definition Instruction.h:361
typename Bitfield::Element< AtomicOrdering, Offset, 3, AtomicOrdering::LAST > AtomicOrderingBitfieldElementT
Definition Instruction.h:153
bool hasMetadata(StringRef Kind) const
Return true if this instruction has the given type of metadata attached.
Definition Instruction.h:422
LLVM_ABI LLVM_DEPRECATED("Use iterators as instruction positions", "") void insertBefore(Instruction *InsertPos)
Insert an unlinked instruction into a basic block immediately before the specified instruction.
static bool isFPDivRem(unsigned Opcode)
Definition Instruction.h:346
bool isCast() const
Definition Instruction.h:321
LLVM_ABI iterator_range< simple_ilist< DbgRecord >::iterator > cloneDebugInfoFrom(const Instruction *From, std::optional< simple_ilist< DbgRecord >::iterator > FromHere=std::nullopt, bool InsertAtHead=false)
Clone any debug-info attached to From onto this instruction.
static bool isBitwiseLogicOp(unsigned Opcode)
Determine if the Opcode is and/or/xor.
Definition Instruction.h:366
bool mayReadOrWriteMemory() const
Return true if this instruction may read or write memory.
Definition Instruction.h:808
LLVM_ABI bool hasPoisonGeneratingReturnAttributes() const LLVM_READONLY
Return true if this instruction has poison-generating attribute.
static bool isShift(unsigned Opcode)
Determine if the Opcode is one of the shift instructions.
Definition Instruction.h:351
Function * getFunction()
Definition Instruction.h:190
LLVM_ABI bool mayWriteToMemory() const LLVM_READONLY
Return true if this instruction may modify memory.
static bool isSpecialTerminator(unsigned Opcode)
Returns true if the Opcode is a "special" terminator that does more than branch to a successor (e....
Definition Instruction.h:387
FuncletPadOps
Definition Instruction.h:1019
iterator_range< simple_ilist< DbgRecord >::iterator > getDbgRecordRange() const
Return a range over the DbgRecords attached to this instruction.
Definition Instruction.h:105
static bool isCast(unsigned Opcode)
Determine if the Opcode is one of the CastInst instructions.
Definition Instruction.h:376
const DebugLoc & getDebugLoc() const
Return the debug location for this node as a DebugLoc.
Definition Instruction.h:513
LLVM_ABI bool isAssociative() const LLVM_READONLY
Return true if the instruction is associative:
Instruction & operator=(const Instruction &)=delete
LLVM_ABI void moveAfter(Instruction *MovePos)
Unlink this instruction from its current basic block and insert it into the basic block that MovePos ...
bool hasMetadataOtherThanDebugLoc() const
Return true if this instruction has metadata attached to it other than a debug location.
Definition Instruction.h:414
LLVM_ABI bool isCommutative() const LLVM_READONLY
Return true if the instruction is commutative:
typename Bitfield::Element< bool, Offset, 1 > BoolBitfieldElementT
Definition Instruction.h:150
bool hasMetadata() const
Return true if this instruction has any metadata attached to it.
Definition Instruction.h:406
LLVM_ABI void moveBefore(InstListType::iterator InsertPos)
Unlink this instruction from its current basic block and insert it into the basic block that MovePos ...
Module * getModule()
Definition Instruction.h:180
LLVM_ABI void insertBefore(InstListType::iterator InsertPos)
Insert an unlinked instruction into a basic block immediately before the specified position.
bool isBinaryOp() const
Definition Instruction.h:317
bool isEHPad() const
Return true if the instruction is a variety of EH-block.
Definition Instruction.h:879
LLVM_ABI void dropPoisonGeneratingReturnAttributes()
Drops return attributes that may generate poison.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition Instruction.h:977
Instruction * user_back()
Specialize the methods defined in Value, as we know that an instruction can only be used by other ins...
Definition Instruction.h:171
static bool isIdempotent(unsigned Opcode)
Definition Instruction.h:783
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
Definition Instruction.h:428
bool isFuncletPad() const
Definition Instruction.h:322
bool isTerminator() const
Definition Instruction.h:315
LLVM_ABI bool comesBefore(const Instruction *Other) const
Given an instruction Other in the same basic block as this instruction, return true if this instructi...
bool hasPoisonGeneratingAnnotations() const
Return true if this instruction has poison-generating flags, return attributes or metadata.
Definition Instruction.h:566
LLVM_ABI bool hasPoisonGeneratingFlags() const LLVM_READONLY
Return true if this operator has flags which may cause this instruction to evaluate to poison despite...
bool isNilpotent() const
Return true if the instruction is nilpotent:
Definition Instruction.h:796
LLVM_ABI bool mayReadFromMemory() const LLVM_READONLY
Return true if this instruction may read memory.
OtherOps
Definition Instruction.h:1026
void dropPoisonGeneratingAnnotations()
Drops flags, return attributes and metadata that may generate poison.
Definition Instruction.h:573
const char * getOpcodeName() const
Definition Instruction.h:314
const Instruction * user_back() const
Definition Instruction.h:172
bool isFPDivRem() const
Definition Instruction.h:319
OperationEquivalenceFlags
When checking for operation equivalence (using isSameOperationAs) it is sometimes useful to ignore ce...
Definition Instruction.h:923
@ CompareIgnoringAlignment
Check for equivalence ignoring load/store alignment.
Definition Instruction.h:925
@ CompareUsingScalarTypes
Check for equivalence treating a type and a vector of that type as equivalent.
Definition Instruction.h:928
@ CompareUsingIntersectedAttrs
Check for equivalence with intersected callbase attrs.
Definition Instruction.h:930
MDNode * getMetadata(StringRef Kind) const
Get the metadata of given kind attached to this Instruction.
Definition Instruction.h:437
void getAllMetadata(SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const
Get all metadata attached to this Instruction.
Definition Instruction.h:446
bool isLogicalShift() const
Return true if this is a logical shift left or a logical shift right.
Definition Instruction.h:356
void getAllMetadataOtherThanDebugLoc(SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const
This does the same thing as getAllMetadata, except that it filters out the debug location.
Definition Instruction.h:453
static bool isFuncletPad(unsigned Opcode)
Determine if the Opcode is one of the FuncletPadInst instructions.
Definition Instruction.h:381
LLVM_ABI void moveAfterPreserving(Instruction *MovePos)
See moveBeforePreserving .
static bool isUnaryOp(unsigned Opcode)
Definition Instruction.h:335
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
Definition Instruction.h:312
static bool isNilpotent(unsigned Opcode)
Definition Instruction.h:797
BinaryOps
Definition Instruction.h:998
LLVM_ABI void dropPoisonGeneratingMetadata()
Drops metadata that may generate poison.
bool isBitwiseLogicOp() const
Return true if this is and/or/xor.
Definition Instruction.h:371
bool isShift() const
Definition Instruction.h:320
TermOps
Definition Instruction.h:984
static bool isTerminator(unsigned Opcode)
Definition Instruction.h:331
Bitfield::Element< uint16_t, 0, 15 > OpaqueField
Definition Instruction.h:137
bool isFenceLike() const
Return true if this instruction behaves like a memory fence: it can load or store to memory location ...
Definition Instruction.h:838
LLVM_ABI std::optional< InstListType::iterator > getInsertionPointAfterDef()
Get the first insertion point at which the result of this instruction is defined.
LLVM_ABI void dropPoisonGeneratingFlags()
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs.
LLVM_ABI void moveBeforePreserving(InstListType::iterator MovePos)
Perform a moveBefore operation, while signalling that the caller intends to preserve the original ord...
LLVM_ABI bool hasPoisonGeneratingMetadata() const LLVM_READONLY
Return true if this instruction has poison-generating metadata.
bool isUnaryOp() const
Definition Instruction.h:316
Instruction(const Instruction &)=delete
void setDebugLoc(DebugLoc Loc)
Set the debug location information for this instruction.
Definition Instruction.h:510
static bool isIntDivRem(unsigned Opcode)
Definition Instruction.h:342
bool isIdempotent() const
Return true if the instruction is idempotent:
Definition Instruction.h:782
LLVM_ABI void insertAfter(Instruction *InsertPos)
Insert an unlinked instruction into a basic block immediately after the specified instruction.
friend class BasicBlock
Various leaf nodes.
Definition Instruction.h:1036
SymbolTableList< Instruction, ilist_iterator_bits< true >, ilist_parent< BasicBlock > > InstListType
Definition Instruction.h:71
bool isIntDivRem() const
Definition Instruction.h:318
UnaryOps
Definition Instruction.h:991
CastOps
Definition Instruction.h:1012
void setSubclassData(typename BitfieldElement::Type Value)
Definition Instruction.h:1062
bool isSpecialTerminator() const
Definition Instruction.h:323
LLVM_ABI InstListType::iterator insertInto(BasicBlock *ParentBB, InstListType::iterator It)
Inserts an unlinked instruction into ParentBB at position It and returns the iterator of the inserted...
A Module instance is used to store all the information related to an LLVM module.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
List that automatically updates parent links and symbol tables.
The instances of the Type class are immutable: once they are created, they are never changed.
User(Type *ty, unsigned vty, AllocInfo AllocInfo)
LLVM Value Representation.
unsigned short getSubclassDataFromValue() const
user_iterator user_begin()
bool hasMetadata() const
Return true if this value has any metadata attached to it.
LLVM_ABI void getAllMetadata(SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const
Appends all metadata attached to this value to MDs, sorting by KindID.
unsigned getValueID() const
Return an ID for the concrete type of this object.
void setValueSubclassData(unsigned short D)
static constexpr unsigned MaxAlignmentExponent
The maximum alignment for instructions.
MDNode * getMetadata(unsigned KindID) const
Get the current metadata attachments for the given kind, if any.
An efficient, type-erasing, non-owning reference to a callable.
ilist_node_with_parent()=default
typename base_list_type::iterator iterator
A range adaptor for a pair of iterators.
ilist_select_iterator_type< OptionsT, false, false > iterator
This file defines the ilist_node class template, which is a convenient base class for creating classe...
@ BasicBlock
Various leaf nodes.
friend class Instruction
Iterator for Instructions in a `BasicBlock.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< simple_ilist< DbgRecord >::iterator > getDbgRecordRange(DbgMarker *DebugMarker)
Inline helper to return a range of DbgRecords attached to a marker.
AtomicOrdering
Atomic ordering for LLVM's memory model.
@ Mul
Product of integers.
@ Xor
Bitwise or logical XOR of integers.
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
Implement std::hash so that hash_code can be used in STL containers.
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Summary of memprof metadata on allocations.
Describes an element of a Bitfield.
static Bitfield::Type get(StorageType Packed)
Unpacks the field from the Packed value.
static constexpr bool isOverlapping()
Returns whether the two bitfields share common bits.
static void set(StorageType &Packed, typename Bitfield::Type Value)
Sets the typed value in the provided Packed value.
Use delete by default for iplist and ilist.
static void deleteNode(NodeTy *V)
Option to add a pointer to this list's owner in every node.