LLVM  15.0.0git
IntrinsicInst.h
Go to the documentation of this file.
1 //===-- llvm/IntrinsicInst.h - Intrinsic Instruction Wrappers ---*- C++ -*-===//
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 defines classes that make it really easy to deal with intrinsic
10 // functions with the isa/dyncast family of functions. In particular, this
11 // allows you to do things like:
12 //
13 // if (MemCpyInst *MCI = dyn_cast<MemCpyInst>(Inst))
14 // ... MCI->getDest() ... MCI->getSource() ...
15 //
16 // All intrinsic function calls are instances of the call instruction, so these
17 // are all subclasses of the CallInst class. Note that none of these classes
18 // has state or virtual methods, which is an important part of this gross/neat
19 // hack working.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 #ifndef LLVM_IR_INTRINSICINST_H
24 #define LLVM_IR_INTRINSICINST_H
25 
26 #include "llvm/IR/Constants.h"
28 #include "llvm/IR/DerivedTypes.h"
29 #include "llvm/IR/FPEnv.h"
30 #include "llvm/IR/Function.h"
31 #include "llvm/IR/GlobalVariable.h"
32 #include "llvm/IR/Instructions.h"
33 #include "llvm/IR/Intrinsics.h"
34 #include "llvm/IR/Value.h"
35 #include "llvm/Support/Casting.h"
36 #include <cassert>
37 #include <cstdint>
38 
39 namespace llvm {
40 
41 class Metadata;
42 
43 /// A wrapper class for inspecting calls to intrinsic functions.
44 /// This allows the standard isa/dyncast/cast functionality to work with calls
45 /// to intrinsic functions.
46 class IntrinsicInst : public CallInst {
47 public:
48  IntrinsicInst() = delete;
49  IntrinsicInst(const IntrinsicInst &) = delete;
50  IntrinsicInst &operator=(const IntrinsicInst &) = delete;
51 
52  /// Return the intrinsic ID of this intrinsic.
55  }
56 
57  /// Return true if swapping the first two arguments to the intrinsic produces
58  /// the same result.
59  bool isCommutative() const {
60  switch (getIntrinsicID()) {
61  case Intrinsic::maxnum:
62  case Intrinsic::minnum:
63  case Intrinsic::maximum:
64  case Intrinsic::minimum:
65  case Intrinsic::smax:
66  case Intrinsic::smin:
67  case Intrinsic::umax:
68  case Intrinsic::umin:
69  case Intrinsic::sadd_sat:
70  case Intrinsic::uadd_sat:
71  case Intrinsic::sadd_with_overflow:
72  case Intrinsic::uadd_with_overflow:
73  case Intrinsic::smul_with_overflow:
74  case Intrinsic::umul_with_overflow:
75  case Intrinsic::smul_fix:
76  case Intrinsic::umul_fix:
77  case Intrinsic::smul_fix_sat:
78  case Intrinsic::umul_fix_sat:
79  case Intrinsic::fma:
80  case Intrinsic::fmuladd:
81  return true;
82  default:
83  return false;
84  }
85  }
86 
87  // Checks if the intrinsic is an annotation.
88  bool isAssumeLikeIntrinsic() const {
89  switch (getIntrinsicID()) {
90  default: break;
91  case Intrinsic::assume:
92  case Intrinsic::sideeffect:
93  case Intrinsic::pseudoprobe:
94  case Intrinsic::dbg_declare:
95  case Intrinsic::dbg_value:
96  case Intrinsic::dbg_label:
97  case Intrinsic::invariant_start:
98  case Intrinsic::invariant_end:
99  case Intrinsic::lifetime_start:
100  case Intrinsic::lifetime_end:
101  case Intrinsic::experimental_noalias_scope_decl:
102  case Intrinsic::objectsize:
103  case Intrinsic::ptr_annotation:
104  case Intrinsic::var_annotation:
105  return true;
106  }
107  return false;
108  }
109 
110  // Methods for support type inquiry through isa, cast, and dyn_cast:
111  static bool classof(const CallInst *I) {
112  if (const Function *CF = I->getCalledFunction())
113  return CF->isIntrinsic();
114  return false;
115  }
116  static bool classof(const Value *V) {
117  return isa<CallInst>(V) && classof(cast<CallInst>(V));
118  }
119 };
120 
121 /// Check if \p ID corresponds to a debug info intrinsic.
122 static inline bool isDbgInfoIntrinsic(Intrinsic::ID ID) {
123  switch (ID) {
124  case Intrinsic::dbg_declare:
125  case Intrinsic::dbg_value:
126  case Intrinsic::dbg_addr:
127  case Intrinsic::dbg_label:
128  return true;
129  default:
130  return false;
131  }
132 }
133 
134 /// This is the common base class for debug info intrinsics.
136 public:
137  /// \name Casting methods
138  /// @{
139  static bool classof(const IntrinsicInst *I) {
140  return isDbgInfoIntrinsic(I->getIntrinsicID());
141  }
142  static bool classof(const Value *V) {
143  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
144  }
145  /// @}
146 };
147 
148 /// This is the common base class for debug info intrinsics for variables.
150 public:
151  // Iterator for ValueAsMetadata that internally uses direct pointer iteration
152  // over either a ValueAsMetadata* or a ValueAsMetadata**, dereferencing to the
153  // ValueAsMetadata .
155  : public iterator_facade_base<location_op_iterator,
156  std::bidirectional_iterator_tag, Value *> {
158 
159  public:
160  location_op_iterator(ValueAsMetadata *SingleIter) : I(SingleIter) {}
161  location_op_iterator(ValueAsMetadata **MultiIter) : I(MultiIter) {}
162 
165  I = R.I;
166  return *this;
167  }
168  bool operator==(const location_op_iterator &RHS) const {
169  return I == RHS.I;
170  }
171  const Value *operator*() const {
172  ValueAsMetadata *VAM = I.is<ValueAsMetadata *>()
173  ? I.get<ValueAsMetadata *>()
174  : *I.get<ValueAsMetadata **>();
175  return VAM->getValue();
176  };
178  ValueAsMetadata *VAM = I.is<ValueAsMetadata *>()
179  ? I.get<ValueAsMetadata *>()
180  : *I.get<ValueAsMetadata **>();
181  return VAM->getValue();
182  }
184  if (I.is<ValueAsMetadata *>())
185  I = I.get<ValueAsMetadata *>() + 1;
186  else
187  I = I.get<ValueAsMetadata **>() + 1;
188  return *this;
189  }
191  if (I.is<ValueAsMetadata *>())
192  I = I.get<ValueAsMetadata *>() - 1;
193  else
194  I = I.get<ValueAsMetadata **>() - 1;
195  return *this;
196  }
197  };
198 
199  /// Get the locations corresponding to the variable referenced by the debug
200  /// info intrinsic. Depending on the intrinsic, this could be the
201  /// variable's value or its address.
203 
204  Value *getVariableLocationOp(unsigned OpIdx) const;
205 
206  void replaceVariableLocationOp(Value *OldValue, Value *NewValue);
207  void replaceVariableLocationOp(unsigned OpIdx, Value *NewValue);
208  /// Adding a new location operand will always result in this intrinsic using
209  /// an ArgList, and must always be accompanied by a new expression that uses
210  /// the new operand.
213 
214  void setVariable(DILocalVariable *NewVar) {
215  setArgOperand(1, MetadataAsValue::get(NewVar->getContext(), NewVar));
216  }
217 
219  setArgOperand(2, MetadataAsValue::get(NewExpr->getContext(), NewExpr));
220  }
221 
222  unsigned getNumVariableLocationOps() const {
223  if (hasArgList())
224  return cast<DIArgList>(getRawLocation())->getArgs().size();
225  return 1;
226  }
227 
228  bool hasArgList() const { return isa<DIArgList>(getRawLocation()); }
229 
230  /// Does this describe the address of a local variable. True for dbg.addr
231  /// and dbg.declare, but not dbg.value, which describes its value.
232  bool isAddressOfVariable() const {
233  return getIntrinsicID() != Intrinsic::dbg_value;
234  }
235 
236  void setUndef() {
237  // TODO: When/if we remove duplicate values from DIArgLists, we don't need
238  // this set anymore.
239  SmallPtrSet<Value *, 4> RemovedValues;
240  for (Value *OldValue : location_ops()) {
241  if (!RemovedValues.insert(OldValue).second)
242  continue;
243  Value *Undef = UndefValue::get(OldValue->getType());
244  replaceVariableLocationOp(OldValue, Undef);
245  }
246  }
247 
248  bool isUndef() const {
249  return (getNumVariableLocationOps() == 0 &&
250  !getExpression()->isComplex()) ||
251  any_of(location_ops(), [](Value *V) { return isa<UndefValue>(V); });
252  }
253 
255  return cast<DILocalVariable>(getRawVariable());
256  }
257 
259  return cast<DIExpression>(getRawExpression());
260  }
261 
263  return cast<MetadataAsValue>(getArgOperand(0))->getMetadata();
264  }
265 
267  return cast<MetadataAsValue>(getArgOperand(1))->getMetadata();
268  }
269 
271  return cast<MetadataAsValue>(getArgOperand(2))->getMetadata();
272  }
273 
274  /// Use of this should generally be avoided; instead,
275  /// replaceVariableLocationOp and addVariableLocationOps should be used where
276  /// possible to avoid creating invalid state.
277  void setRawLocation(Metadata *Location) {
278  return setArgOperand(0, MetadataAsValue::get(getContext(), Location));
279  }
280 
281  /// Get the size (in bits) of the variable, or fragment of the variable that
282  /// is described.
284 
285  /// \name Casting methods
286  /// @{
287  static bool classof(const IntrinsicInst *I) {
288  switch (I->getIntrinsicID()) {
289  case Intrinsic::dbg_declare:
290  case Intrinsic::dbg_value:
291  case Intrinsic::dbg_addr:
292  return true;
293  default:
294  return false;
295  }
296  }
297  static bool classof(const Value *V) {
298  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
299  }
300  /// @}
301 private:
302  void setArgOperand(unsigned i, Value *v) {
304  }
305  void setOperand(unsigned i, Value *v) { DbgInfoIntrinsic::setOperand(i, v); }
306 };
307 
308 /// This represents the llvm.dbg.declare instruction.
310 public:
311  Value *getAddress() const {
313  "dbg.declare must have exactly 1 location operand.");
314  return getVariableLocationOp(0);
315  }
316 
317  /// \name Casting methods
318  /// @{
319  static bool classof(const IntrinsicInst *I) {
320  return I->getIntrinsicID() == Intrinsic::dbg_declare;
321  }
322  static bool classof(const Value *V) {
323  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
324  }
325  /// @}
326 };
327 
328 /// This represents the llvm.dbg.addr instruction.
330 public:
331  Value *getAddress() const {
333  "dbg.addr must have exactly 1 location operand.");
334  return getVariableLocationOp(0);
335  }
336 
337  /// \name Casting methods
338  /// @{
339  static bool classof(const IntrinsicInst *I) {
340  return I->getIntrinsicID() == Intrinsic::dbg_addr;
341  }
342  static bool classof(const Value *V) {
343  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
344  }
345 };
346 
347 /// This represents the llvm.dbg.value instruction.
349 public:
350  // The default argument should only be used in ISel, and the default option
351  // should be removed once ISel support for multiple location ops is complete.
352  Value *getValue(unsigned OpIdx = 0) const {
353  return getVariableLocationOp(OpIdx);
354  }
356  return location_ops();
357  }
358 
359  /// \name Casting methods
360  /// @{
361  static bool classof(const IntrinsicInst *I) {
362  return I->getIntrinsicID() == Intrinsic::dbg_value;
363  }
364  static bool classof(const Value *V) {
365  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
366  }
367  /// @}
368 };
369 
370 /// This represents the llvm.dbg.label instruction.
372 public:
373  DILabel *getLabel() const { return cast<DILabel>(getRawLabel()); }
374 
376  return cast<MetadataAsValue>(getArgOperand(0))->getMetadata();
377  }
378 
379  /// Methods for support type inquiry through isa, cast, and dyn_cast:
380  /// @{
381  static bool classof(const IntrinsicInst *I) {
382  return I->getIntrinsicID() == Intrinsic::dbg_label;
383  }
384  static bool classof(const Value *V) {
385  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
386  }
387  /// @}
388 };
389 
390 /// This is the common base class for vector predication intrinsics.
391 class VPIntrinsic : public IntrinsicInst {
392 public:
393  /// \brief Declares a llvm.vp.* intrinsic in \p M that matches the parameters
394  /// \p Params. Additionally, the load and gather intrinsics require
395  /// \p ReturnType to be specified.
397  Type *ReturnType,
398  ArrayRef<Value *> Params);
399 
402 
403  /// The llvm.vp.* intrinsics for this instruction Opcode
404  static Intrinsic::ID getForOpcode(unsigned OC);
405 
406  // Whether \p ID is a VP intrinsic ID.
407  static bool isVPIntrinsic(Intrinsic::ID);
408 
409  /// \return The mask parameter or nullptr.
410  Value *getMaskParam() const;
411  void setMaskParam(Value *);
412 
413  /// \return The vector length parameter or nullptr.
414  Value *getVectorLengthParam() const;
415  void setVectorLengthParam(Value *);
416 
417  /// \return Whether the vector length param can be ignored.
418  bool canIgnoreVectorLengthParam() const;
419 
420  /// \return The static element count (vector number of elements) the vector
421  /// length parameter applies to.
423 
424  /// \return The alignment of the pointer used by this load/store/gather or
425  /// scatter.
427  // MaybeAlign setPointerAlignment(Align NewAlign); // TODO
428 
429  /// \return The pointer operand of this load,store, gather or scatter.
430  Value *getMemoryPointerParam() const;
432 
433  /// \return The data (payload) operand of this store or scatter.
434  Value *getMemoryDataParam() const;
436 
437  // Methods for support type inquiry through isa, cast, and dyn_cast:
438  static bool classof(const IntrinsicInst *I) {
439  return isVPIntrinsic(I->getIntrinsicID());
440  }
441  static bool classof(const Value *V) {
442  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
443  }
444 
445  // Equivalent non-predicated opcode
448  }
449 
450  // Equivalent non-predicated opcode
452 };
453 
454 /// This represents vector predication reduction intrinsics.
456 public:
457  static bool isVPReduction(Intrinsic::ID ID);
458 
459  unsigned getStartParamPos() const;
460  unsigned getVectorParamPos() const;
461 
464 
465  /// Methods for support type inquiry through isa, cast, and dyn_cast:
466  /// @{
467  static bool classof(const IntrinsicInst *I) {
468  return VPReductionIntrinsic::isVPReduction(I->getIntrinsicID());
469  }
470  static bool classof(const Value *V) {
471  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
472  }
473  /// @}
474 };
475 
476 class VPCastIntrinsic : public VPIntrinsic {
477 public:
478  static bool isVPCast(Intrinsic::ID ID);
479 
480  /// Methods for support type inquiry through isa, cast, and dyn_cast:
481  /// @{
482  static bool classof(const IntrinsicInst *I) {
483  return VPCastIntrinsic::isVPCast(I->getIntrinsicID());
484  }
485  static bool classof(const Value *V) {
486  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
487  }
488  /// @}
489 };
490 
491 class VPCmpIntrinsic : public VPIntrinsic {
492 public:
493  static bool isVPCmp(Intrinsic::ID ID);
494 
496 
497  /// Methods for support type inquiry through isa, cast, and dyn_cast:
498  /// @{
499  static bool classof(const IntrinsicInst *I) {
500  return VPCmpIntrinsic::isVPCmp(I->getIntrinsicID());
501  }
502  static bool classof(const Value *V) {
503  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
504  }
505  /// @}
506 };
507 
508 /// This is the common base class for constrained floating point intrinsics.
510 public:
511  bool isUnaryOp() const;
512  bool isTernaryOp() const;
515  bool isDefaultFPEnvironment() const;
516 
517  // Methods for support type inquiry through isa, cast, and dyn_cast:
518  static bool classof(const IntrinsicInst *I);
519  static bool classof(const Value *V) {
520  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
521  }
522 };
523 
524 /// Constrained floating point compare intrinsics.
526 public:
528  bool isSignaling() const {
529  return getIntrinsicID() == Intrinsic::experimental_constrained_fcmps;
530  }
531 
532  // Methods for support type inquiry through isa, cast, and dyn_cast:
533  static bool classof(const IntrinsicInst *I) {
534  switch (I->getIntrinsicID()) {
535  case Intrinsic::experimental_constrained_fcmp:
536  case Intrinsic::experimental_constrained_fcmps:
537  return true;
538  default:
539  return false;
540  }
541  }
542  static bool classof(const Value *V) {
543  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
544  }
545 };
546 
547 /// This class represents min/max intrinsics.
549 public:
550  static bool classof(const IntrinsicInst *I) {
551  switch (I->getIntrinsicID()) {
552  case Intrinsic::umin:
553  case Intrinsic::umax:
554  case Intrinsic::smin:
555  case Intrinsic::smax:
556  return true;
557  default:
558  return false;
559  }
560  }
561  static bool classof(const Value *V) {
562  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
563  }
564 
565  Value *getLHS() const { return const_cast<Value *>(getArgOperand(0)); }
566  Value *getRHS() const { return const_cast<Value *>(getArgOperand(1)); }
567 
568  /// Returns the comparison predicate underlying the intrinsic.
570  switch (ID) {
571  case Intrinsic::umin:
572  return ICmpInst::Predicate::ICMP_ULT;
573  case Intrinsic::umax:
574  return ICmpInst::Predicate::ICMP_UGT;
575  case Intrinsic::smin:
576  return ICmpInst::Predicate::ICMP_SLT;
577  case Intrinsic::smax:
578  return ICmpInst::Predicate::ICMP_SGT;
579  default:
580  llvm_unreachable("Invalid intrinsic");
581  }
582  }
583 
584  /// Returns the comparison predicate underlying the intrinsic.
586  return getPredicate(getIntrinsicID());
587  }
588 
589  /// Whether the intrinsic is signed or unsigned.
590  static bool isSigned(Intrinsic::ID ID) {
592  };
593 
594  /// Whether the intrinsic is signed or unsigned.
595  bool isSigned() const { return isSigned(getIntrinsicID()); };
596 
597  /// Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values,
598  /// so there is a certain threshold value, upon reaching which,
599  /// their value can no longer change. Return said threshold.
600  static APInt getSaturationPoint(Intrinsic::ID ID, unsigned numBits) {
601  switch (ID) {
602  case Intrinsic::umin:
603  return APInt::getMinValue(numBits);
604  case Intrinsic::umax:
605  return APInt::getMaxValue(numBits);
606  case Intrinsic::smin:
607  return APInt::getSignedMinValue(numBits);
608  case Intrinsic::smax:
609  return APInt::getSignedMaxValue(numBits);
610  default:
611  llvm_unreachable("Invalid intrinsic");
612  }
613  }
614 
615  /// Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values,
616  /// so there is a certain threshold value, upon reaching which,
617  /// their value can no longer change. Return said threshold.
618  APInt getSaturationPoint(unsigned numBits) const {
619  return getSaturationPoint(getIntrinsicID(), numBits);
620  }
621 
622  /// Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values,
623  /// so there is a certain threshold value, upon reaching which,
624  /// their value can no longer change. Return said threshold.
628  }
629 
630  /// Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values,
631  /// so there is a certain threshold value, upon reaching which,
632  /// their value can no longer change. Return said threshold.
634  return getSaturationPoint(getIntrinsicID(), Ty);
635  }
636 };
637 
638 /// This class represents an intrinsic that is based on a binary operation.
639 /// This includes op.with.overflow and saturating add/sub intrinsics.
641 public:
642  static bool classof(const IntrinsicInst *I) {
643  switch (I->getIntrinsicID()) {
644  case Intrinsic::uadd_with_overflow:
645  case Intrinsic::sadd_with_overflow:
646  case Intrinsic::usub_with_overflow:
647  case Intrinsic::ssub_with_overflow:
648  case Intrinsic::umul_with_overflow:
649  case Intrinsic::smul_with_overflow:
650  case Intrinsic::uadd_sat:
651  case Intrinsic::sadd_sat:
652  case Intrinsic::usub_sat:
653  case Intrinsic::ssub_sat:
654  return true;
655  default:
656  return false;
657  }
658  }
659  static bool classof(const Value *V) {
660  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
661  }
662 
663  Value *getLHS() const { return const_cast<Value *>(getArgOperand(0)); }
664  Value *getRHS() const { return const_cast<Value *>(getArgOperand(1)); }
665 
666  /// Returns the binary operation underlying the intrinsic.
668 
669  /// Whether the intrinsic is signed or unsigned.
670  bool isSigned() const;
671 
672  /// Returns one of OBO::NoSignedWrap or OBO::NoUnsignedWrap.
673  unsigned getNoWrapKind() const;
674 };
675 
676 /// Represents an op.with.overflow intrinsic.
678 public:
679  static bool classof(const IntrinsicInst *I) {
680  switch (I->getIntrinsicID()) {
681  case Intrinsic::uadd_with_overflow:
682  case Intrinsic::sadd_with_overflow:
683  case Intrinsic::usub_with_overflow:
684  case Intrinsic::ssub_with_overflow:
685  case Intrinsic::umul_with_overflow:
686  case Intrinsic::smul_with_overflow:
687  return true;
688  default:
689  return false;
690  }
691  }
692  static bool classof(const Value *V) {
693  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
694  }
695 };
696 
697 /// Represents a saturating add/sub intrinsic.
699 public:
700  static bool classof(const IntrinsicInst *I) {
701  switch (I->getIntrinsicID()) {
702  case Intrinsic::uadd_sat:
703  case Intrinsic::sadd_sat:
704  case Intrinsic::usub_sat:
705  case Intrinsic::ssub_sat:
706  return true;
707  default:
708  return false;
709  }
710  }
711  static bool classof(const Value *V) {
712  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
713  }
714 };
715 
716 /// Common base class for all memory intrinsics. Simply provides
717 /// common methods.
718 /// Written as CRTP to avoid a common base class amongst the
719 /// three atomicity hierarchies.
720 template <typename Derived> class MemIntrinsicBase : public IntrinsicInst {
721 private:
722  enum { ARG_DEST = 0, ARG_LENGTH = 2 };
723 
724 public:
725  Value *getRawDest() const {
726  return const_cast<Value *>(getArgOperand(ARG_DEST));
727  }
728  const Use &getRawDestUse() const { return getArgOperandUse(ARG_DEST); }
729  Use &getRawDestUse() { return getArgOperandUse(ARG_DEST); }
730 
731  Value *getLength() const {
732  return const_cast<Value *>(getArgOperand(ARG_LENGTH));
733  }
734  const Use &getLengthUse() const { return getArgOperandUse(ARG_LENGTH); }
735  Use &getLengthUse() { return getArgOperandUse(ARG_LENGTH); }
736 
737  /// This is just like getRawDest, but it strips off any cast
738  /// instructions (including addrspacecast) that feed it, giving the
739  /// original input. The returned value is guaranteed to be a pointer.
740  Value *getDest() const { return getRawDest()->stripPointerCasts(); }
741 
742  unsigned getDestAddressSpace() const {
743  return cast<PointerType>(getRawDest()->getType())->getAddressSpace();
744  }
745 
746  /// FIXME: Remove this function once transition to Align is over.
747  /// Use getDestAlign() instead.
748  unsigned getDestAlignment() const {
749  if (auto MA = getParamAlign(ARG_DEST))
750  return MA->value();
751  return 0;
752  }
753  MaybeAlign getDestAlign() const { return getParamAlign(ARG_DEST); }
754 
755  /// Set the specified arguments of the instruction.
756  void setDest(Value *Ptr) {
757  assert(getRawDest()->getType() == Ptr->getType() &&
758  "setDest called with pointer of wrong type!");
759  setArgOperand(ARG_DEST, Ptr);
760  }
761 
762  void setDestAlignment(MaybeAlign Alignment) {
763  removeParamAttr(ARG_DEST, Attribute::Alignment);
764  if (Alignment)
765  addParamAttr(ARG_DEST,
766  Attribute::getWithAlignment(getContext(), *Alignment));
767  }
768  void setDestAlignment(Align Alignment) {
769  removeParamAttr(ARG_DEST, Attribute::Alignment);
770  addParamAttr(ARG_DEST,
772  }
773 
774  void setLength(Value *L) {
775  assert(getLength()->getType() == L->getType() &&
776  "setLength called with value of wrong type!");
777  setArgOperand(ARG_LENGTH, L);
778  }
779 };
780 
781 /// Common base class for all memory transfer intrinsics. Simply provides
782 /// common methods.
783 template <class BaseCL> class MemTransferBase : public BaseCL {
784 private:
785  enum { ARG_SOURCE = 1 };
786 
787 public:
788  /// Return the arguments to the instruction.
789  Value *getRawSource() const {
790  return const_cast<Value *>(BaseCL::getArgOperand(ARG_SOURCE));
791  }
792  const Use &getRawSourceUse() const {
793  return BaseCL::getArgOperandUse(ARG_SOURCE);
794  }
795  Use &getRawSourceUse() { return BaseCL::getArgOperandUse(ARG_SOURCE); }
796 
797  /// This is just like getRawSource, but it strips off any cast
798  /// instructions that feed it, giving the original input. The returned
799  /// value is guaranteed to be a pointer.
800  Value *getSource() const { return getRawSource()->stripPointerCasts(); }
801 
802  unsigned getSourceAddressSpace() const {
803  return cast<PointerType>(getRawSource()->getType())->getAddressSpace();
804  }
805 
806  /// FIXME: Remove this function once transition to Align is over.
807  /// Use getSourceAlign() instead.
808  unsigned getSourceAlignment() const {
809  if (auto MA = BaseCL::getParamAlign(ARG_SOURCE))
810  return MA->value();
811  return 0;
812  }
813 
815  return BaseCL::getParamAlign(ARG_SOURCE);
816  }
817 
818  void setSource(Value *Ptr) {
819  assert(getRawSource()->getType() == Ptr->getType() &&
820  "setSource called with pointer of wrong type!");
821  BaseCL::setArgOperand(ARG_SOURCE, Ptr);
822  }
823 
824  /// FIXME: Remove this function once transition to Align is over.
825  /// Use the version that takes MaybeAlign instead of this one.
826  void setSourceAlignment(unsigned Alignment) {
827  setSourceAlignment(MaybeAlign(Alignment));
828  }
829  void setSourceAlignment(MaybeAlign Alignment) {
830  BaseCL::removeParamAttr(ARG_SOURCE, Attribute::Alignment);
831  if (Alignment)
832  BaseCL::addParamAttr(ARG_SOURCE, Attribute::getWithAlignment(
833  BaseCL::getContext(), *Alignment));
834  }
835  void setSourceAlignment(Align Alignment) {
836  BaseCL::removeParamAttr(ARG_SOURCE, Attribute::Alignment);
837  BaseCL::addParamAttr(ARG_SOURCE, Attribute::getWithAlignment(
838  BaseCL::getContext(), Alignment));
839  }
840 };
841 
842 /// Common base class for all memset intrinsics. Simply provides
843 /// common methods.
844 template <class BaseCL> class MemSetBase : public BaseCL {
845 private:
846  enum { ARG_VALUE = 1 };
847 
848 public:
849  Value *getValue() const {
850  return const_cast<Value *>(BaseCL::getArgOperand(ARG_VALUE));
851  }
852  const Use &getValueUse() const { return BaseCL::getArgOperandUse(ARG_VALUE); }
853  Use &getValueUse() { return BaseCL::getArgOperandUse(ARG_VALUE); }
854 
855  void setValue(Value *Val) {
856  assert(getValue()->getType() == Val->getType() &&
857  "setValue called with value of wrong type!");
858  BaseCL::setArgOperand(ARG_VALUE, Val);
859  }
860 };
861 
862 // The common base class for the atomic memset/memmove/memcpy intrinsics
863 // i.e. llvm.element.unordered.atomic.memset/memcpy/memmove
864 class AtomicMemIntrinsic : public MemIntrinsicBase<AtomicMemIntrinsic> {
865 private:
866  enum { ARG_ELEMENTSIZE = 3 };
867 
868 public:
870  return const_cast<Value *>(getArgOperand(ARG_ELEMENTSIZE));
871  }
872 
874  return cast<ConstantInt>(getRawElementSizeInBytes());
875  }
876 
879  }
880 
883  "setElementSizeInBytes called with value of wrong type!");
884  setArgOperand(ARG_ELEMENTSIZE, V);
885  }
886 
887  static bool classof(const IntrinsicInst *I) {
888  switch (I->getIntrinsicID()) {
889  case Intrinsic::memcpy_element_unordered_atomic:
890  case Intrinsic::memmove_element_unordered_atomic:
891  case Intrinsic::memset_element_unordered_atomic:
892  return true;
893  default:
894  return false;
895  }
896  }
897  static bool classof(const Value *V) {
898  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
899  }
900 };
901 
902 /// This class represents atomic memset intrinsic
903 // i.e. llvm.element.unordered.atomic.memset
904 class AtomicMemSetInst : public MemSetBase<AtomicMemIntrinsic> {
905 public:
906  static bool classof(const IntrinsicInst *I) {
907  return I->getIntrinsicID() == Intrinsic::memset_element_unordered_atomic;
908  }
909  static bool classof(const Value *V) {
910  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
911  }
912 };
913 
914 // This class wraps the atomic memcpy/memmove intrinsics
915 // i.e. llvm.element.unordered.atomic.memcpy/memmove
916 class AtomicMemTransferInst : public MemTransferBase<AtomicMemIntrinsic> {
917 public:
918  static bool classof(const IntrinsicInst *I) {
919  switch (I->getIntrinsicID()) {
920  case Intrinsic::memcpy_element_unordered_atomic:
921  case Intrinsic::memmove_element_unordered_atomic:
922  return true;
923  default:
924  return false;
925  }
926  }
927  static bool classof(const Value *V) {
928  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
929  }
930 };
931 
932 /// This class represents the atomic memcpy intrinsic
933 /// i.e. llvm.element.unordered.atomic.memcpy
935 public:
936  static bool classof(const IntrinsicInst *I) {
937  return I->getIntrinsicID() == Intrinsic::memcpy_element_unordered_atomic;
938  }
939  static bool classof(const Value *V) {
940  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
941  }
942 };
943 
944 /// This class represents the atomic memmove intrinsic
945 /// i.e. llvm.element.unordered.atomic.memmove
947 public:
948  static bool classof(const IntrinsicInst *I) {
949  return I->getIntrinsicID() == Intrinsic::memmove_element_unordered_atomic;
950  }
951  static bool classof(const Value *V) {
952  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
953  }
954 };
955 
956 /// This is the common base class for memset/memcpy/memmove.
957 class MemIntrinsic : public MemIntrinsicBase<MemIntrinsic> {
958 private:
959  enum { ARG_VOLATILE = 3 };
960 
961 public:
963  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(ARG_VOLATILE)));
964  }
965 
966  bool isVolatile() const { return !getVolatileCst()->isZero(); }
967 
968  void setVolatile(Constant *V) { setArgOperand(ARG_VOLATILE, V); }
969 
970  // Methods for support type inquiry through isa, cast, and dyn_cast:
971  static bool classof(const IntrinsicInst *I) {
972  switch (I->getIntrinsicID()) {
973  case Intrinsic::memcpy:
974  case Intrinsic::memmove:
975  case Intrinsic::memset:
976  case Intrinsic::memset_inline:
977  case Intrinsic::memcpy_inline:
978  return true;
979  default:
980  return false;
981  }
982  }
983  static bool classof(const Value *V) {
984  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
985  }
986 };
987 
988 /// This class wraps the llvm.memset and llvm.memset.inline intrinsics.
989 class MemSetInst : public MemSetBase<MemIntrinsic> {
990 public:
991  // Methods for support type inquiry through isa, cast, and dyn_cast:
992  static bool classof(const IntrinsicInst *I) {
993  switch (I->getIntrinsicID()) {
994  case Intrinsic::memset:
995  case Intrinsic::memset_inline:
996  return true;
997  default:
998  return false;
999  }
1000  }
1001  static bool classof(const Value *V) {
1002  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1003  }
1004 };
1005 
1006 /// This class wraps the llvm.memset.inline intrinsic.
1008 public:
1010  return cast<ConstantInt>(MemSetInst::getLength());
1011  }
1012  // Methods for support type inquiry through isa, cast, and dyn_cast:
1013  static bool classof(const IntrinsicInst *I) {
1014  return I->getIntrinsicID() == Intrinsic::memset_inline;
1015  }
1016  static bool classof(const Value *V) {
1017  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1018  }
1019 };
1020 
1021 /// This class wraps the llvm.memcpy/memmove intrinsics.
1022 class MemTransferInst : public MemTransferBase<MemIntrinsic> {
1023 public:
1024  // Methods for support type inquiry through isa, cast, and dyn_cast:
1025  static bool classof(const IntrinsicInst *I) {
1026  switch (I->getIntrinsicID()) {
1027  case Intrinsic::memcpy:
1028  case Intrinsic::memmove:
1029  case Intrinsic::memcpy_inline:
1030  return true;
1031  default:
1032  return false;
1033  }
1034  }
1035  static bool classof(const Value *V) {
1036  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1037  }
1038 };
1039 
1040 /// This class wraps the llvm.memcpy intrinsic.
1041 class MemCpyInst : public MemTransferInst {
1042 public:
1043  // Methods for support type inquiry through isa, cast, and dyn_cast:
1044  static bool classof(const IntrinsicInst *I) {
1045  return I->getIntrinsicID() == Intrinsic::memcpy ||
1046  I->getIntrinsicID() == Intrinsic::memcpy_inline;
1047  }
1048  static bool classof(const Value *V) {
1049  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1050  }
1051 };
1052 
1053 /// This class wraps the llvm.memmove intrinsic.
1055 public:
1056  // Methods for support type inquiry through isa, cast, and dyn_cast:
1057  static bool classof(const IntrinsicInst *I) {
1058  return I->getIntrinsicID() == Intrinsic::memmove;
1059  }
1060  static bool classof(const Value *V) {
1061  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1062  }
1063 };
1064 
1065 /// This class wraps the llvm.memcpy.inline intrinsic.
1067 public:
1069  return cast<ConstantInt>(MemCpyInst::getLength());
1070  }
1071  // Methods for support type inquiry through isa, cast, and dyn_cast:
1072  static bool classof(const IntrinsicInst *I) {
1073  return I->getIntrinsicID() == Intrinsic::memcpy_inline;
1074  }
1075  static bool classof(const Value *V) {
1076  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1077  }
1078 };
1079 
1080 // The common base class for any memset/memmove/memcpy intrinsics;
1081 // whether they be atomic or non-atomic.
1082 // i.e. llvm.element.unordered.atomic.memset/memcpy/memmove
1083 // and llvm.memset/memcpy/memmove
1084 class AnyMemIntrinsic : public MemIntrinsicBase<AnyMemIntrinsic> {
1085 public:
1086  bool isVolatile() const {
1087  // Only the non-atomic intrinsics can be volatile
1088  if (auto *MI = dyn_cast<MemIntrinsic>(this))
1089  return MI->isVolatile();
1090  return false;
1091  }
1092 
1093  static bool classof(const IntrinsicInst *I) {
1094  switch (I->getIntrinsicID()) {
1095  case Intrinsic::memcpy:
1096  case Intrinsic::memcpy_inline:
1097  case Intrinsic::memmove:
1098  case Intrinsic::memset:
1099  case Intrinsic::memset_inline:
1100  case Intrinsic::memcpy_element_unordered_atomic:
1101  case Intrinsic::memmove_element_unordered_atomic:
1102  case Intrinsic::memset_element_unordered_atomic:
1103  return true;
1104  default:
1105  return false;
1106  }
1107  }
1108  static bool classof(const Value *V) {
1109  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1110  }
1111 };
1112 
1113 /// This class represents any memset intrinsic
1114 // i.e. llvm.element.unordered.atomic.memset
1115 // and llvm.memset
1116 class AnyMemSetInst : public MemSetBase<AnyMemIntrinsic> {
1117 public:
1118  static bool classof(const IntrinsicInst *I) {
1119  switch (I->getIntrinsicID()) {
1120  case Intrinsic::memset:
1121  case Intrinsic::memset_inline:
1122  case Intrinsic::memset_element_unordered_atomic:
1123  return true;
1124  default:
1125  return false;
1126  }
1127  }
1128  static bool classof(const Value *V) {
1129  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1130  }
1131 };
1132 
1133 // This class wraps any memcpy/memmove intrinsics
1134 // i.e. llvm.element.unordered.atomic.memcpy/memmove
1135 // and llvm.memcpy/memmove
1136 class AnyMemTransferInst : public MemTransferBase<AnyMemIntrinsic> {
1137 public:
1138  static bool classof(const IntrinsicInst *I) {
1139  switch (I->getIntrinsicID()) {
1140  case Intrinsic::memcpy:
1141  case Intrinsic::memcpy_inline:
1142  case Intrinsic::memmove:
1143  case Intrinsic::memcpy_element_unordered_atomic:
1144  case Intrinsic::memmove_element_unordered_atomic:
1145  return true;
1146  default:
1147  return false;
1148  }
1149  }
1150  static bool classof(const Value *V) {
1151  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1152  }
1153 };
1154 
1155 /// This class represents any memcpy intrinsic
1156 /// i.e. llvm.element.unordered.atomic.memcpy
1157 /// and llvm.memcpy
1159 public:
1160  static bool classof(const IntrinsicInst *I) {
1161  switch (I->getIntrinsicID()) {
1162  case Intrinsic::memcpy:
1163  case Intrinsic::memcpy_inline:
1164  case Intrinsic::memcpy_element_unordered_atomic:
1165  return true;
1166  default:
1167  return false;
1168  }
1169  }
1170  static bool classof(const Value *V) {
1171  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1172  }
1173 };
1174 
1175 /// This class represents any memmove intrinsic
1176 /// i.e. llvm.element.unordered.atomic.memmove
1177 /// and llvm.memmove
1179 public:
1180  static bool classof(const IntrinsicInst *I) {
1181  switch (I->getIntrinsicID()) {
1182  case Intrinsic::memmove:
1183  case Intrinsic::memmove_element_unordered_atomic:
1184  return true;
1185  default:
1186  return false;
1187  }
1188  }
1189  static bool classof(const Value *V) {
1190  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1191  }
1192 };
1193 
1194 /// This represents the llvm.va_start intrinsic.
1195 class VAStartInst : public IntrinsicInst {
1196 public:
1197  static bool classof(const IntrinsicInst *I) {
1198  return I->getIntrinsicID() == Intrinsic::vastart;
1199  }
1200  static bool classof(const Value *V) {
1201  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1202  }
1203 
1204  Value *getArgList() const { return const_cast<Value *>(getArgOperand(0)); }
1205 };
1206 
1207 /// This represents the llvm.va_end intrinsic.
1208 class VAEndInst : public IntrinsicInst {
1209 public:
1210  static bool classof(const IntrinsicInst *I) {
1211  return I->getIntrinsicID() == Intrinsic::vaend;
1212  }
1213  static bool classof(const Value *V) {
1214  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1215  }
1216 
1217  Value *getArgList() const { return const_cast<Value *>(getArgOperand(0)); }
1218 };
1219 
1220 /// This represents the llvm.va_copy intrinsic.
1221 class VACopyInst : public IntrinsicInst {
1222 public:
1223  static bool classof(const IntrinsicInst *I) {
1224  return I->getIntrinsicID() == Intrinsic::vacopy;
1225  }
1226  static bool classof(const Value *V) {
1227  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1228  }
1229 
1230  Value *getDest() const { return const_cast<Value *>(getArgOperand(0)); }
1231  Value *getSrc() const { return const_cast<Value *>(getArgOperand(1)); }
1232 };
1233 
1234 /// A base class for all instrprof intrinsics.
1236 public:
1237  // The name of the instrumented function.
1239  return cast<GlobalVariable>(
1240  const_cast<Value *>(getArgOperand(0))->stripPointerCasts());
1241  }
1242  // The hash of the CFG for the instrumented function.
1244  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(1)));
1245  }
1246  // The number of counters for the instrumented function.
1247  ConstantInt *getNumCounters() const;
1248  // The index of the counter that this instruction acts on.
1249  ConstantInt *getIndex() const;
1250 };
1251 
1252 /// This represents the llvm.instrprof.cover intrinsic.
1254 public:
1255  static bool classof(const IntrinsicInst *I) {
1256  return I->getIntrinsicID() == Intrinsic::instrprof_cover;
1257  }
1258  static bool classof(const Value *V) {
1259  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1260  }
1261 };
1262 
1263 /// This represents the llvm.instrprof.increment intrinsic.
1265 public:
1266  static bool classof(const IntrinsicInst *I) {
1267  return I->getIntrinsicID() == Intrinsic::instrprof_increment;
1268  }
1269  static bool classof(const Value *V) {
1270  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1271  }
1272  Value *getStep() const;
1273 };
1274 
1275 /// This represents the llvm.instrprof.increment.step intrinsic.
1277 public:
1278  static bool classof(const IntrinsicInst *I) {
1279  return I->getIntrinsicID() == Intrinsic::instrprof_increment_step;
1280  }
1281  static bool classof(const Value *V) {
1282  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1283  }
1284 };
1285 
1286 /// This represents the llvm.instrprof.value.profile intrinsic.
1288 public:
1289  static bool classof(const IntrinsicInst *I) {
1290  return I->getIntrinsicID() == Intrinsic::instrprof_value_profile;
1291  }
1292  static bool classof(const Value *V) {
1293  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1294  }
1295 
1297  return cast<Value>(const_cast<Value *>(getArgOperand(2)));
1298  }
1299 
1301  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(3)));
1302  }
1303 
1304  // Returns the value site index.
1306  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(4)));
1307  }
1308 };
1309 
1311 public:
1312  static bool classof(const IntrinsicInst *I) {
1313  return I->getIntrinsicID() == Intrinsic::pseudoprobe;
1314  }
1315 
1316  static bool classof(const Value *V) {
1317  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1318  }
1319 
1321  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(0)));
1322  }
1323 
1325  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(1)));
1326  }
1327 
1329  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(2)));
1330  }
1331 
1333  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(3)));
1334  }
1335 };
1336 
1338 public:
1339  static bool classof(const IntrinsicInst *I) {
1340  return I->getIntrinsicID() == Intrinsic::experimental_noalias_scope_decl;
1341  }
1342 
1343  static bool classof(const Value *V) {
1344  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1345  }
1346 
1348  auto *MV =
1349  cast<MetadataAsValue>(getOperand(Intrinsic::NoAliasScopeDeclScopeArg));
1350  return cast<MDNode>(MV->getMetadata());
1351  }
1352 
1353  void setScopeList(MDNode *ScopeList) {
1355  MetadataAsValue::get(getContext(), ScopeList));
1356  }
1357 };
1358 
1359 // Defined in Statepoint.h -- NOT a subclass of IntrinsicInst
1360 class GCStatepointInst;
1361 
1362 /// Common base class for representing values projected from a statepoint.
1363 /// Currently, the only projections available are gc.result and gc.relocate.
1365 public:
1366  static bool classof(const IntrinsicInst *I) {
1367  return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate ||
1368  I->getIntrinsicID() == Intrinsic::experimental_gc_result;
1369  }
1370 
1371  static bool classof(const Value *V) {
1372  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1373  }
1374 
1375  /// Return true if this relocate is tied to the invoke statepoint.
1376  /// This includes relocates which are on the unwinding path.
1377  bool isTiedToInvoke() const {
1378  const Value *Token = getArgOperand(0);
1379 
1380  return isa<LandingPadInst>(Token) || isa<InvokeInst>(Token);
1381  }
1382 
1383  /// The statepoint with which this gc.relocate is associated.
1384  const GCStatepointInst *getStatepoint() const;
1385 };
1386 
1387 /// Represents calls to the gc.relocate intrinsic.
1389 public:
1390  static bool classof(const IntrinsicInst *I) {
1391  return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate;
1392  }
1393 
1394  static bool classof(const Value *V) {
1395  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1396  }
1397 
1398  /// The index into the associate statepoint's argument list
1399  /// which contains the base pointer of the pointer whose
1400  /// relocation this gc.relocate describes.
1401  unsigned getBasePtrIndex() const {
1402  return cast<ConstantInt>(getArgOperand(1))->getZExtValue();
1403  }
1404 
1405  /// The index into the associate statepoint's argument list which
1406  /// contains the pointer whose relocation this gc.relocate describes.
1407  unsigned getDerivedPtrIndex() const {
1408  return cast<ConstantInt>(getArgOperand(2))->getZExtValue();
1409  }
1410 
1411  Value *getBasePtr() const;
1412  Value *getDerivedPtr() const;
1413 };
1414 
1415 /// Represents calls to the gc.result intrinsic.
1417 public:
1418  static bool classof(const IntrinsicInst *I) {
1419  return I->getIntrinsicID() == Intrinsic::experimental_gc_result;
1420  }
1421 
1422  static bool classof(const Value *V) {
1423  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1424  }
1425 };
1426 
1427 
1428 /// This represents the llvm.assume intrinsic.
1429 class AssumeInst : public IntrinsicInst {
1430 public:
1431  static bool classof(const IntrinsicInst *I) {
1432  return I->getIntrinsicID() == Intrinsic::assume;
1433  }
1434  static bool classof(const Value *V) {
1435  return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
1436  }
1437 };
1438 
1439 } // end namespace llvm
1440 
1441 #endif // LLVM_IR_INTRINSICINST_H
llvm::DbgVariableIntrinsic::setRawLocation
void setRawLocation(Metadata *Location)
Use of this should generally be avoided; instead, replaceVariableLocationOp and addVariableLocationOp...
Definition: IntrinsicInst.h:277
llvm::NoAliasScopeDeclInst
Definition: IntrinsicInst.h:1337
i
i
Definition: README.txt:29
llvm::DbgDeclareInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:322
llvm::DbgVariableIntrinsic::getExpression
DIExpression * getExpression() const
Definition: IntrinsicInst.h:258
llvm::BinaryOpIntrinsic::getBinaryOp
Instruction::BinaryOps getBinaryOp() const
Returns the binary operation underlying the intrinsic.
Definition: IntrinsicInst.cpp:657
llvm::VPIntrinsic::getVectorLengthParamPos
static Optional< unsigned > getVectorLengthParamPos(Intrinsic::ID IntrinsicID)
Definition: IntrinsicInst.cpp:350
llvm::DbgAddrIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:339
llvm::SaturatingInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:700
llvm::MemCpyInlineInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1075
llvm::MemSetInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:992
llvm::DbgInfoIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:139
llvm::MemCpyInlineInst::getLength
ConstantInt * getLength() const
Definition: IntrinsicInst.h:1068
llvm::MemIntrinsicBase::getDestAlignment
unsigned getDestAlignment() const
FIXME: Remove this function once transition to Align is over.
Definition: IntrinsicInst.h:748
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:104
llvm::DbgVariableIntrinsic::getRawExpression
Metadata * getRawExpression() const
Definition: IntrinsicInst.h:270
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::DbgDeclareInst::getAddress
Value * getAddress() const
Definition: IntrinsicInst.h:311
llvm::InstrProfIncrementInst::getStep
Value * getStep() const
Definition: IntrinsicInst.cpp:191
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::PseudoProbeInst
Definition: IntrinsicInst.h:1310
llvm::DbgValueInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:361
llvm::InstrProfIncrementInstStep::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1281
llvm::MinMaxIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:550
llvm::WithOverflowInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:679
llvm::CmpInst::Predicate
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Definition: InstrTypes.h:719
llvm::MemIntrinsicBase::getDestAlign
MaybeAlign getDestAlign() const
Definition: IntrinsicInst.h:753
llvm::ElementCount
Definition: TypeSize.h:404
llvm::ConstrainedFPCmpIntrinsic
Constrained floating point compare intrinsics.
Definition: IntrinsicInst.h:525
DebugInfoMetadata.h
llvm::ConstrainedFPCmpIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:542
llvm::MemTransferInst
This class wraps the llvm.memcpy/memmove intrinsics.
Definition: IntrinsicInst.h:1022
llvm::Function
Definition: Function.h:60
llvm::AtomicMemIntrinsic::getElementSizeInBytes
uint32_t getElementSizeInBytes() const
Definition: IntrinsicInst.h:877
llvm::GCRelocateInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1390
llvm::DbgVariableIntrinsic::location_op_iterator::operator*
Value * operator*()
Definition: IntrinsicInst.h:177
llvm::IntrinsicInst::getIntrinsicID
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
Definition: IntrinsicInst.h:53
llvm::InstrProfInstBase
A base class for all instrprof intrinsics.
Definition: IntrinsicInst.h:1235
llvm::MemMoveInst
This class wraps the llvm.memmove intrinsic.
Definition: IntrinsicInst.h:1054
llvm::MemSetInlineInst::getLength
ConstantInt * getLength() const
Definition: IntrinsicInst.h:1009
minimum
Should compile r2 movcc movcs str strb mov lr r1 movcs movcc mov lr r1 str mov mov cmp r1 movlo r2 str bx lr r0 mov mov cmp r0 movhs r2 mov r1 bx lr Some of the NEON intrinsics may be appropriate for more general either as target independent intrinsics or perhaps elsewhere in the ARM backend Some of them may also be lowered to target independent and perhaps some new SDNodes could be added For minimum
Definition: README.txt:489
llvm::VPReductionIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:470
llvm::InstrProfCoverInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1258
llvm::AtomicMemIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:897
llvm::AnyMemSetInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1128
llvm::AtomicMemIntrinsic::getRawElementSizeInBytes
Value * getRawElementSizeInBytes() const
Definition: IntrinsicInst.h:869
llvm::BinaryOpIntrinsic::getRHS
Value * getRHS() const
Definition: IntrinsicInst.h:664
llvm::MemIntrinsicBase::getDestAddressSpace
unsigned getDestAddressSpace() const
Definition: IntrinsicInst.h:742
llvm::APInt::getMinValue
static APInt getMinValue(unsigned numBits)
Gets minimum unsigned value of APInt for a specific bit width.
Definition: APInt.h:196
llvm::BinaryOpIntrinsic::getLHS
Value * getLHS() const
Definition: IntrinsicInst.h:663
llvm::InstrProfIncrementInstStep::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1278
llvm::APInt::getMaxValue
static APInt getMaxValue(unsigned numBits)
Gets maximum unsigned value of APInt for specific bit width.
Definition: APInt.h:186
llvm::VACopyInst::getSrc
Value * getSrc() const
Definition: IntrinsicInst.h:1231
llvm::VPIntrinsic::setVectorLengthParam
void setVectorLengthParam(Value *)
Definition: IntrinsicInst.cpp:332
llvm::VAStartInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1200
llvm::GlobalVariable
Definition: GlobalVariable.h:39
llvm::BinaryOpIntrinsic
This class represents an intrinsic that is based on a binary operation.
Definition: IntrinsicInst.h:640
llvm::VPCmpIntrinsic::getPredicate
CmpInst::Predicate getPredicate() const
Definition: IntrinsicInst.cpp:606
llvm::MemIntrinsic::getVolatileCst
ConstantInt * getVolatileCst() const
Definition: IntrinsicInst.h:962
llvm::VPReductionIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: IntrinsicInst.h:467
llvm::MemMoveInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1057
llvm::DbgVariableIntrinsic::replaceVariableLocationOp
void replaceVariableLocationOp(Value *OldValue, Value *NewValue)
Definition: IntrinsicInst.cpp:80
llvm::VPIntrinsic::canIgnoreVectorLengthParam
bool canIgnoreVectorLengthParam() const
Definition: IntrinsicInst.cpp:447
llvm::DbgVariableIntrinsic::location_op_iterator::operator==
bool operator==(const location_op_iterator &RHS) const
Definition: IntrinsicInst.h:168
llvm::ConstrainedFPIntrinsic::isDefaultFPEnvironment
bool isDefaultFPEnvironment() const
Definition: IntrinsicInst.cpp:223
llvm::CallBase::getArgOperandUse
const Use & getArgOperandUse(unsigned i) const
Wrappers for getting the Use of a call argument.
Definition: InstrTypes.h:1352
llvm::NoAliasScopeDeclInst::getScopeList
MDNode * getScopeList() const
Definition: IntrinsicInst.h:1347
llvm::AtomicMemIntrinsic::getElementSizeInBytesCst
ConstantInt * getElementSizeInBytesCst() const
Definition: IntrinsicInst.h:873
NewExpr
Definition: ItaniumDemangle.h:1922
llvm::AssumeInst
This represents the llvm.assume intrinsic.
Definition: IntrinsicInst.h:1429
llvm::GCProjectionInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1371
llvm::APInt::getSignedMaxValue
static APInt getSignedMaxValue(unsigned numBits)
Gets maximum signed value of APInt for a specific bit width.
Definition: APInt.h:189
llvm::AnyMemIntrinsic::isVolatile
bool isVolatile() const
Definition: IntrinsicInst.h:1086
llvm::VPIntrinsic::getDeclarationForParams
static Function * getDeclarationForParams(Module *M, Intrinsic::ID, Type *ReturnType, ArrayRef< Value * > Params)
Declares a llvm.vp.
Definition: IntrinsicInst.cpp:489
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::MemIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:983
llvm::InstrProfCoverInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1255
llvm::VPIntrinsic::getMemoryDataParam
Value * getMemoryDataParam() const
Definition: IntrinsicInst.cpp:390
llvm::InstrProfInstBase::getIndex
ConstantInt * getIndex() const
Definition: IntrinsicInst.cpp:185
llvm::GCRelocateInst::getBasePtrIndex
unsigned getBasePtrIndex() const
The index into the associate statepoint's argument list which contains the base pointer of the pointe...
Definition: IntrinsicInst.h:1401
llvm::DbgVariableIntrinsic::getVariable
DILocalVariable * getVariable() const
Definition: IntrinsicInst.h:254
llvm::MemIntrinsic
This is the common base class for memset/memcpy/memmove.
Definition: IntrinsicInst.h:957
llvm::InstrProfInstBase::getNumCounters
ConstantInt * getNumCounters() const
Definition: IntrinsicInst.cpp:179
llvm::VPIntrinsic::getFunctionalOpcodeForVP
static Optional< unsigned > getFunctionalOpcodeForVP(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:422
llvm::Optional< uint64_t >
llvm::MinMaxIntrinsic::getPredicate
static ICmpInst::Predicate getPredicate(Intrinsic::ID ID)
Returns the comparison predicate underlying the intrinsic.
Definition: IntrinsicInst.h:569
llvm::SmallPtrSet< Value *, 4 >
llvm::MemIntrinsicBase::setDestAlignment
void setDestAlignment(MaybeAlign Alignment)
Definition: IntrinsicInst.h:762
llvm::ConstrainedFPIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.cpp:287
llvm::InstrProfIncrementInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1269
llvm::InstrProfInstBase::getHash
ConstantInt * getHash() const
Definition: IntrinsicInst.h:1243
llvm::DIExpression
DWARF expression.
Definition: DebugInfoMetadata.h:2558
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::DbgLabelInst::getRawLabel
Metadata * getRawLabel() const
Definition: IntrinsicInst.h:375
llvm::WithOverflowInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:692
llvm::AnyMemSetInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1118
llvm::CallBase::addParamAttr
void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind)
Adds the attribute to the indicated argument.
Definition: InstrTypes.h:1526
llvm::Type::getInt8Ty
static IntegerType * getInt8Ty(LLVMContext &C)
Definition: Type.cpp:237
llvm::DbgVariableIntrinsic::getRawVariable
Metadata * getRawVariable() const
Definition: IntrinsicInst.h:266
llvm::DbgVariableIntrinsic::getVariableLocationOp
Value * getVariableLocationOp(unsigned OpIdx) const
Definition: IntrinsicInst.cpp:58
llvm::APIntOps::umin
const APInt & umin(const APInt &A, const APInt &B)
Determine the smaller of two APInts considered to be unsigned.
Definition: APInt.h:2137
llvm::InstrProfIncrementInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1266
llvm::MemSetBase::getValue
Value * getValue() const
Definition: IntrinsicInst.h:849
llvm::VPIntrinsic::setMaskParam
void setMaskParam(Value *)
Definition: IntrinsicInst.cpp:321
llvm::GCResultInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1422
llvm::DbgVariableIntrinsic::setVariable
void setVariable(DILocalVariable *NewVar)
Definition: IntrinsicInst.h:214
llvm::GCRelocateInst::getDerivedPtrIndex
unsigned getDerivedPtrIndex() const
The index into the associate statepoint's argument list which contains the pointer whose relocation t...
Definition: IntrinsicInst.h:1407
llvm::InstrProfValueProfileInst::getValueKind
ConstantInt * getValueKind() const
Definition: IntrinsicInst.h:1300
llvm::VAStartInst
This represents the llvm.va_start intrinsic.
Definition: IntrinsicInst.h:1195
llvm::GCStatepointInst
Represents a gc.statepoint intrinsic call.
Definition: Statepoint.h:62
llvm::DbgVariableIntrinsic::location_op_iterator::operator=
location_op_iterator & operator=(const location_op_iterator &R)
Definition: IntrinsicInst.h:164
llvm::MemIntrinsicBase::setDestAlignment
void setDestAlignment(Align Alignment)
Definition: IntrinsicInst.h:768
llvm::VPReductionIntrinsic::isVPReduction
static bool isVPReduction(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:552
llvm::ConstantInt
This is the shared class of boolean and integer constants.
Definition: Constants.h:79
llvm::MemCpyInlineInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1072
llvm::Intrinsic::getType
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
Return the function type for an intrinsic.
Definition: Function.cpp:1374
llvm::CallBase::removeParamAttr
void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind)
Removes the attribute from the given argument.
Definition: InstrTypes.h:1568
llvm::GCProjectionInst
Common base class for representing values projected from a statepoint.
Definition: IntrinsicInst.h:1364
llvm::MemTransferBase::getSourceAddressSpace
unsigned getSourceAddressSpace() const
Definition: IntrinsicInst.h:802
llvm::VPCmpIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: IntrinsicInst.h:499
llvm::DbgVariableIntrinsic::addVariableLocationOps
void addVariableLocationOps(ArrayRef< Value * > NewValues, DIExpression *NewExpr)
Adding a new location operand will always result in this intrinsic using an ArgList,...
Definition: IntrinsicInst.cpp:119
Constants.h
llvm::DbgValueInst
This represents the llvm.dbg.value instruction.
Definition: IntrinsicInst.h:348
BaseCL
llvm::MemSetBase::getValueUse
const Use & getValueUse() const
Definition: IntrinsicInst.h:852
llvm::DILocalVariable
Local variable.
Definition: DebugInfoMetadata.h:3058
llvm::DbgVariableIntrinsic::isAddressOfVariable
bool isAddressOfVariable() const
Does this describe the address of a local variable.
Definition: IntrinsicInst.h:232
llvm::VPReductionIntrinsic
This represents vector predication reduction intrinsics.
Definition: IntrinsicInst.h:455
Intrinsics.h
llvm::ConstrainedFPIntrinsic
This is the common base class for constrained floating point intrinsics.
Definition: IntrinsicInst.h:509
llvm::MemSetBase::setValue
void setValue(Value *Val)
Definition: IntrinsicInst.h:855
llvm::AtomicMemTransferInst
Definition: IntrinsicInst.h:916
llvm::CallBase::getCalledFunction
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation or the function signa...
Definition: InstrTypes.h:1396
llvm::PseudoProbeInst::getFactor
ConstantInt * getFactor() const
Definition: IntrinsicInst.h:1332
llvm::InstrProfValueProfileInst::getTargetValue
Value * getTargetValue() const
Definition: IntrinsicInst.h:1296
llvm::MemTransferBase::getRawSourceUse
Use & getRawSourceUse()
Definition: IntrinsicInst.h:795
llvm::AnyMemMoveInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1180
llvm::MemTransferBase::getRawSource
Value * getRawSource() const
Return the arguments to the instruction.
Definition: IntrinsicInst.h:789
llvm::DbgDeclareInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:319
llvm::MemCpyInlineInst
This class wraps the llvm.memcpy.inline intrinsic.
Definition: IntrinsicInst.h:1066
llvm::VACopyInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1226
llvm::MemCpyInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1044
llvm::BinaryOpIntrinsic::getNoWrapKind
unsigned getNoWrapKind() const
Returns one of OBO::NoSignedWrap or OBO::NoUnsignedWrap.
Definition: IntrinsicInst.cpp:690
llvm::DbgInfoIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:142
llvm::MaybeAlign
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:117
llvm::MinMaxIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:561
llvm::DbgVariableIntrinsic::setExpression
void setExpression(DIExpression *NewExpr)
Definition: IntrinsicInst.h:218
llvm::SaturatingInst
Represents a saturating add/sub intrinsic.
Definition: IntrinsicInst.h:698
llvm::MemSetInlineInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1016
llvm::Type::getScalarSizeInBits
unsigned getScalarSizeInBits() const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
Definition: Type.cpp:189
llvm::InstrProfIncrementInstStep
This represents the llvm.instrprof.increment.step intrinsic.
Definition: IntrinsicInst.h:1276
llvm::UndefValue::get
static UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
Definition: Constants.cpp:1768
llvm::MemSetInlineInst
This class wraps the llvm.memset.inline intrinsic.
Definition: IntrinsicInst.h:1007
llvm::VPIntrinsic::getForOpcode
static Intrinsic::ID getForOpcode(unsigned OC)
The llvm.vp.* intrinsics for this instruction Opcode.
Definition: IntrinsicInst.cpp:434
llvm::IntrinsicInst::operator=
IntrinsicInst & operator=(const IntrinsicInst &)=delete
llvm::MemTransferBase::setSourceAlignment
void setSourceAlignment(MaybeAlign Alignment)
Definition: IntrinsicInst.h:829
llvm::InstrProfValueProfileInst::getIndex
ConstantInt * getIndex() const
Definition: IntrinsicInst.h:1305
llvm::DbgVariableIntrinsic::hasArgList
bool hasArgList() const
Definition: IntrinsicInst.h:228
llvm::DbgInfoIntrinsic
This is the common base class for debug info intrinsics.
Definition: IntrinsicInst.h:135
llvm::VPCmpIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:502
llvm::AtomicMemCpyInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:939
llvm::MinMaxIntrinsic::getSaturationPoint
static Constant * getSaturationPoint(Intrinsic::ID ID, Type *Ty)
Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values, so there is a certain thre...
Definition: IntrinsicInst.h:625
llvm::AnyMemIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1093
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::Metadata
Root of the metadata hierarchy.
Definition: Metadata.h:62
llvm::AtomicMemCpyInst
This class represents the atomic memcpy intrinsic i.e.
Definition: IntrinsicInst.h:934
llvm::MemTransferBase::getSourceAlign
MaybeAlign getSourceAlign() const
Definition: IntrinsicInst.h:814
llvm::MemTransferInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1025
llvm::DbgVariableIntrinsic::getNumVariableLocationOps
unsigned getNumVariableLocationOps() const
Definition: IntrinsicInst.h:222
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::VPCastIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: IntrinsicInst.h:482
llvm::MemSetInst
This class wraps the llvm.memset and llvm.memset.inline intrinsics.
Definition: IntrinsicInst.h:989
llvm::VPCmpIntrinsic::isVPCmp
static bool isVPCmp(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:576
llvm::AnyMemTransferInst
Definition: IntrinsicInst.h:1136
llvm::maxnum
LLVM_READONLY APFloat maxnum(const APFloat &A, const APFloat &B)
Implements IEEE maxNum semantics.
Definition: APFloat.h:1307
llvm::VPIntrinsic::getMemoryPointerParamPos
static Optional< unsigned > getMemoryPointerParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:377
llvm::VPCastIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:485
llvm::AtomicMemSetInst
This class represents atomic memset intrinsic.
Definition: IntrinsicInst.h:904
llvm::VAEndInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1213
llvm::VPIntrinsic::getVectorLengthParam
Value * getVectorLengthParam() const
Definition: IntrinsicInst.cpp:326
llvm::NoAliasScopeDeclInst::setScopeList
void setScopeList(MDNode *ScopeList)
Definition: IntrinsicInst.h:1353
llvm::VPIntrinsic::getFunctionalOpcode
Optional< unsigned > getFunctionalOpcode() const
Definition: IntrinsicInst.h:446
llvm::Value::Value
Value(Type *Ty, unsigned scid)
Definition: Value.cpp:49
llvm::DbgVariableIntrinsic::location_op_iterator::operator*
const Value * operator*() const
Definition: IntrinsicInst.h:171
llvm::BinaryOpIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:642
llvm::PseudoProbeInst::getFuncGuid
ConstantInt * getFuncGuid() const
Definition: IntrinsicInst.h:1320
llvm::DbgVariableIntrinsic
This is the common base class for debug info intrinsics for variables.
Definition: IntrinsicInst.h:149
llvm::VPIntrinsic::getStaticVectorLength
ElementCount getStaticVectorLength() const
Definition: IntrinsicInst.cpp:298
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::DbgVariableIntrinsic::location_op_iterator::location_op_iterator
location_op_iterator(ValueAsMetadata **MultiIter)
Definition: IntrinsicInst.h:161
llvm::VPIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:441
llvm::GCRelocateInst
Represents calls to the gc.relocate intrinsic.
Definition: IntrinsicInst.h:1388
llvm::DbgVariableIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:287
llvm::InstrProfValueProfileInst
This represents the llvm.instrprof.value.profile intrinsic.
Definition: IntrinsicInst.h:1287
llvm::BinaryOpIntrinsic::isSigned
bool isSigned() const
Whether the intrinsic is signed or unsigned.
Definition: IntrinsicInst.cpp:677
llvm::DbgVariableIntrinsic::setUndef
void setUndef()
Definition: IntrinsicInst.h:236
llvm::AtomicMemSetInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:906
llvm::DbgDeclareInst
This represents the llvm.dbg.declare instruction.
Definition: IntrinsicInst.h:309
llvm::VPIntrinsic::getPointerAlignment
MaybeAlign getPointerAlignment() const
Definition: IntrinsicInst.cpp:364
llvm::DbgLabelInst
This represents the llvm.dbg.label instruction.
Definition: IntrinsicInst.h:371
llvm::MinMaxIntrinsic::isSigned
static bool isSigned(Intrinsic::ID ID)
Whether the intrinsic is signed or unsigned.
Definition: IntrinsicInst.h:590
llvm::GCRelocateInst::getDerivedPtr
Value * getDerivedPtr() const
Definition: IntrinsicInst.cpp:722
llvm::MemTransferBase::setSource
void setSource(Value *Ptr)
Definition: IntrinsicInst.h:818
llvm::DbgLabelInst::getLabel
DILabel * getLabel() const
Definition: IntrinsicInst.h:373
llvm::VPCastIntrinsic
Definition: IntrinsicInst.h:476
llvm::ConstrainedFPIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:519
llvm::AssumeInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1431
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::iterator_facade_base
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
Definition: iterator.h:80
llvm::IntrinsicInst::classof
static bool classof(const CallInst *I)
Definition: IntrinsicInst.h:111
llvm::VPIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:438
llvm::VPIntrinsic::isVPIntrinsic
static bool isVPIntrinsic(Intrinsic::ID)
Definition: IntrinsicInst.cpp:409
llvm::MemSetInlineInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1013
llvm::GCProjectionInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1366
llvm::MemTransferBase
Common base class for all memory transfer intrinsics.
Definition: IntrinsicInst.h:783
llvm::AtomicMemCpyInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:936
maximum
Should compile r2 movcc movcs str strb mov lr r1 movcs movcc mov lr r1 str mov mov cmp r1 movlo r2 str bx lr r0 mov mov cmp r0 movhs r2 mov r1 bx lr Some of the NEON intrinsics may be appropriate for more general either as target independent intrinsics or perhaps elsewhere in the ARM backend Some of them may also be lowered to target independent and perhaps some new SDNodes could be added For maximum
Definition: README.txt:489
llvm::MemCpyInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1048
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MemIntrinsicBase::setDest
void setDest(Value *Ptr)
Set the specified arguments of the instruction.
Definition: IntrinsicInst.h:756
llvm::MinMaxIntrinsic::isSigned
bool isSigned() const
Whether the intrinsic is signed or unsigned.
Definition: IntrinsicInst.h:595
memcpy
<%struct.s * > cast struct s *S to sbyte *< sbyte * > sbyte uint cast struct s *agg result to sbyte *< sbyte * > sbyte uint cast struct s *memtmp to sbyte *< sbyte * > sbyte uint ret void llc ends up issuing two memcpy or custom lower memcpy(of small size) to be ldmia/stmia. I think option 2 is better but the current register allocator cannot allocate a chunk of registers at a time. A feasible temporary solution is to use specific physical registers at the lowering time for small(<
llvm::AssumeInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1434
llvm::InstrProfInstBase::getName
GlobalVariable * getName() const
Definition: IntrinsicInst.h:1238
llvm::DbgVariableIntrinsic::location_op_iterator::operator++
location_op_iterator & operator++()
Definition: IntrinsicInst.h:183
llvm::SystemZISD::OC
@ OC
Definition: SystemZISelLowering.h:122
llvm::MemTransferInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1035
llvm::DbgVariableIntrinsic::location_op_iterator::location_op_iterator
location_op_iterator(ValueAsMetadata *SingleIter)
Definition: IntrinsicInst.h:160
llvm::MinMaxIntrinsic::getPredicate
ICmpInst::Predicate getPredicate() const
Returns the comparison predicate underlying the intrinsic.
Definition: IntrinsicInst.h:585
llvm::MemIntrinsicBase::getLengthUse
Use & getLengthUse()
Definition: IntrinsicInst.h:735
llvm::ValueAsMetadata::getValue
Value * getValue() const
Definition: Metadata.h:385
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::MDNode
Metadata node.
Definition: Metadata.h:944
llvm::MemSetInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1001
llvm::MinMaxIntrinsic::getLHS
Value * getLHS() const
Definition: IntrinsicInst.h:565
llvm::MemIntrinsicBase::setLength
void setLength(Value *L)
Definition: IntrinsicInst.h:774
llvm::AnyMemTransferInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1138
llvm::VPIntrinsic::getMemoryDataParamPos
static Optional< unsigned > getMemoryDataParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:397
llvm::VACopyInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1223
llvm::ARM::WinEH::ReturnType
ReturnType
Definition: ARMWinEH.h:25
llvm::MemTransferBase::setSourceAlignment
void setSourceAlignment(Align Alignment)
Definition: IntrinsicInst.h:835
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::User::setOperand
void setOperand(unsigned i, Value *Val)
Definition: User.h:174
llvm::AtomicMemMoveInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:948
llvm::Intrinsic::NoAliasScopeDeclScopeArg
static const int NoAliasScopeDeclScopeArg
Definition: Intrinsics.h:38
llvm::ConstrainedFPCmpIntrinsic::getPredicate
FCmpInst::Predicate getPredicate() const
Definition: IntrinsicInst.cpp:261
llvm::Function::getIntrinsicID
Intrinsic::ID getIntrinsicID() const LLVM_READONLY
getIntrinsicID - This method returns the ID number of the specified function, or Intrinsic::not_intri...
Definition: Function.h:205
llvm::APIntOps::smin
const APInt & smin(const APInt &A, const APInt &B)
Determine the smaller of two APInts considered to be signed.
Definition: APInt.h:2127
llvm::NoAliasScopeDeclInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1343
llvm::MemSetBase
Common base class for all memset intrinsics.
Definition: IntrinsicInst.h:844
llvm::MemIntrinsicBase::getDest
Value * getDest() const
This is just like getRawDest, but it strips off any cast instructions (including addrspacecast) that ...
Definition: IntrinsicInst.h:740
llvm::AnyMemMoveInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1189
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ConstrainedFPIntrinsic::getExceptionBehavior
Optional< fp::ExceptionBehavior > getExceptionBehavior() const
Definition: IntrinsicInst.cpp:212
llvm::VAEndInst
This represents the llvm.va_end intrinsic.
Definition: IntrinsicInst.h:1208
llvm::AnyMemIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1108
llvm::any_of
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1624
llvm::CallBase::getParamAlign
MaybeAlign getParamAlign(unsigned ArgNo) const
Extract the alignment for a call or parameter (0=unknown).
Definition: InstrTypes.h:1742
llvm::MemTransferBase::setSourceAlignment
void setSourceAlignment(unsigned Alignment)
FIXME: Remove this function once transition to Align is over.
Definition: IntrinsicInst.h:826
llvm::PseudoProbeInst::getIndex
ConstantInt * getIndex() const
Definition: IntrinsicInst.h:1324
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::Value::getType
Type * getType() const
All values are typed, get the type of this value.
Definition: Value.h:255
llvm::GCResultInst
Represents calls to the gc.result intrinsic.
Definition: IntrinsicInst.h:1416
llvm::ConstantInt::isZero
bool isZero() const
This is just a convenience method to make client code smaller for a common code.
Definition: Constants.h:194
llvm::PseudoProbeInst::getAttributes
ConstantInt * getAttributes() const
Definition: IntrinsicInst.h:1328
llvm::DbgVariableIntrinsic::getRawLocation
Metadata * getRawLocation() const
Definition: IntrinsicInst.h:262
uint32_t
llvm::Value::getContext
LLVMContext & getContext() const
All values hold a context through their type.
Definition: Value.cpp:991
llvm::InstrProfValueProfileInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1292
llvm::AtomicMemIntrinsic::setElementSizeInBytes
void setElementSizeInBytes(Constant *V)
Definition: IntrinsicInst.h:881
llvm::DbgVariableIntrinsic::getFragmentSizeInBits
Optional< uint64_t > getFragmentSizeInBits() const
Get the size (in bits) of the variable, or fragment of the variable that is described.
Definition: IntrinsicInst.cpp:136
llvm::WithOverflowInst
Represents an op.with.overflow intrinsic.
Definition: IntrinsicInst.h:677
llvm::VPReductionIntrinsic::getStartParamPos
unsigned getStartParamPos() const
Definition: IntrinsicInst.cpp:629
llvm::MemMoveInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1060
llvm::VPCmpIntrinsic
Definition: IntrinsicInst.h:491
llvm::CallBase::setArgOperand
void setArgOperand(unsigned i, Value *v)
Definition: InstrTypes.h:1346
llvm::PointerUnion
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
Definition: PointerUnion.h:112
llvm::Value::stripPointerCasts
const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs and address space casts.
Definition: Value.cpp:682
llvm::VAEndInst::getArgList
Value * getArgList() const
Definition: IntrinsicInst.h:1217
llvm::AtomicMemTransferInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:918
llvm::ConstantInt::getZExtValue
uint64_t getZExtValue() const
Return the constant as a 64-bit unsigned integer value after it has been zero extended as appropriate...
Definition: Constants.h:142
llvm::MDNode::getContext
LLVMContext & getContext() const
Definition: Metadata.h:1094
llvm::Attribute::getWithAlignment
static Attribute getWithAlignment(LLVMContext &Context, Align Alignment)
Return a uniquified Attribute object that has the specific alignment set.
Definition: Attributes.cpp:164
llvm::IntrinsicInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:116
llvm::APIntOps::umax
const APInt & umax(const APInt &A, const APInt &B)
Determine the larger of two APInts considered to be unsigned.
Definition: APInt.h:2142
llvm::GCResultInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1418
llvm::GCRelocateInst::getBasePtr
Value * getBasePtr() const
Definition: IntrinsicInst.cpp:716
llvm::MemIntrinsicBase::getRawDestUse
Use & getRawDestUse()
Definition: IntrinsicInst.h:729
llvm::minnum
LLVM_READONLY APFloat minnum(const APFloat &A, const APFloat &B)
Implements IEEE minNum semantics.
Definition: APFloat.h:1296
llvm::MinMaxIntrinsic::getSaturationPoint
Constant * getSaturationPoint(Type *Ty) const
Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values, so there is a certain thre...
Definition: IntrinsicInst.h:633
FPEnv.h
llvm::AtomicMemTransferInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:927
llvm::InstrProfValueProfileInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1289
llvm::GCRelocateInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1394
llvm::MemIntrinsicBase::getLength
Value * getLength() const
Definition: IntrinsicInst.h:731
llvm::ConstrainedFPIntrinsic::isUnaryOp
bool isUnaryOp() const
Definition: IntrinsicInst.cpp:265
llvm::AnyMemSetInst
This class represents any memset intrinsic.
Definition: IntrinsicInst.h:1116
llvm::VPIntrinsic::getMemoryPointerParam
Value * getMemoryPointerParam() const
Definition: IntrinsicInst.cpp:371
llvm::MetadataAsValue::get
static MetadataAsValue * get(LLVMContext &Context, Metadata *MD)
Definition: Metadata.cpp:102
llvm::SaturatingInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:711
llvm::VACopyInst
This represents the llvm.va_copy intrinsic.
Definition: IntrinsicInst.h:1221
llvm::VAStartInst::getArgList
Value * getArgList() const
Definition: IntrinsicInst.h:1204
llvm::VPIntrinsic
This is the common base class for vector predication intrinsics.
Definition: IntrinsicInst.h:391
GlobalVariable.h
llvm::MemIntrinsicBase
Common base class for all memory intrinsics.
Definition: IntrinsicInst.h:720
llvm::VPReductionIntrinsic::getVectorParamPos
unsigned getVectorParamPos() const
Definition: IntrinsicInst.cpp:625
Casting.h
Function.h
llvm::NoAliasScopeDeclInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1339
llvm::isDbgInfoIntrinsic
static bool isDbgInfoIntrinsic(Intrinsic::ID ID)
Check if ID corresponds to a debug info intrinsic.
Definition: IntrinsicInst.h:122
llvm::MemTransferBase::getSourceAlignment
unsigned getSourceAlignment() const
FIXME: Remove this function once transition to Align is over.
Definition: IntrinsicInst.h:808
llvm::CmpInst::isSigned
bool isSigned() const
Definition: InstrTypes.h:947
llvm::VACopyInst::getDest
Value * getDest() const
Definition: IntrinsicInst.h:1230
llvm::MemIntrinsicBase::getLengthUse
const Use & getLengthUse() const
Definition: IntrinsicInst.h:734
llvm::ConstrainedFPIntrinsic::isTernaryOp
bool isTernaryOp() const
Definition: IntrinsicInst.cpp:276
llvm::InstrProfCoverInst
This represents the llvm.instrprof.cover intrinsic.
Definition: IntrinsicInst.h:1253
llvm::VAEndInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1210
llvm::VPIntrinsic::getMaskParamPos
static Optional< unsigned > getMaskParamPos(Intrinsic::ID IntrinsicID)
Definition: IntrinsicInst.cpp:337
llvm::AnyMemMoveInst
This class represents any memmove intrinsic i.e.
Definition: IntrinsicInst.h:1178
llvm::APInt::getSignedMinValue
static APInt getSignedMinValue(unsigned numBits)
Gets minimum signed value of APInt for a specific bit width.
Definition: APInt.h:199
llvm::IntrinsicInst
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:46
llvm::ConstrainedFPCmpIntrinsic::isSignaling
bool isSignaling() const
Definition: IntrinsicInst.h:528
llvm::InstrProfIncrementInst
This represents the llvm.instrprof.increment intrinsic.
Definition: IntrinsicInst.h:1264
llvm::AtomicMemIntrinsic
Definition: IntrinsicInst.h:864
llvm::MinMaxIntrinsic::getSaturationPoint
static APInt getSaturationPoint(Intrinsic::ID ID, unsigned numBits)
Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values, so there is a certain thre...
Definition: IntrinsicInst.h:600
llvm::Instruction::BinaryOps
BinaryOps
Definition: Instruction.h:786
llvm::MemIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:971
llvm::AtomicMemSetInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:909
Instructions.h
llvm::MemCpyInst
This class wraps the llvm.memcpy intrinsic.
Definition: IntrinsicInst.h:1041
llvm::MemIntrinsicBase::getRawDestUse
const Use & getRawDestUse() const
Definition: IntrinsicInst.h:728
llvm::Constant::getIntegerValue
static Constant * getIntegerValue(Type *Ty, const APInt &V)
Return the value for an integer or pointer constant, or a vector thereof, with the given scalar value...
Definition: Constants.cpp:378
llvm::MinMaxIntrinsic
This class represents min/max intrinsics.
Definition: IntrinsicInst.h:548
llvm::PseudoProbeInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1312
llvm::MemIntrinsic::isVolatile
bool isVolatile() const
Definition: IntrinsicInst.h:966
llvm::DbgVariableIntrinsic::location_op_iterator
Definition: IntrinsicInst.h:154
llvm::DbgValueInst::getValue
Value * getValue(unsigned OpIdx=0) const
Definition: IntrinsicInst.h:352
llvm::CallBase::getArgOperand
Value * getArgOperand(unsigned i) const
Definition: InstrTypes.h:1341
llvm::DbgAddrIntrinsic::getAddress
Value * getAddress() const
Definition: IntrinsicInst.h:331
llvm::IntrinsicInst::isCommutative
bool isCommutative() const
Return true if swapping the first two arguments to the intrinsic produces the same result.
Definition: IntrinsicInst.h:59
llvm::VPCastIntrinsic::isVPCast
static bool isVPCast(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:564
LineType::Metadata
@ Metadata
llvm::DbgAddrIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:342
llvm::DbgVariableIntrinsic::location_ops
iterator_range< location_op_iterator > location_ops() const
Get the locations corresponding to the variable referenced by the debug info intrinsic.
Definition: IntrinsicInst.cpp:41
llvm::DbgVariableIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:297
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::AtomicMemMoveInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:951
llvm::IntrinsicInst::isAssumeLikeIntrinsic
bool isAssumeLikeIntrinsic() const
Definition: IntrinsicInst.h:88
llvm::MemIntrinsicBase::getRawDest
Value * getRawDest() const
Definition: IntrinsicInst.h:725
llvm::ConstrainedFPCmpIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:533
llvm::MemIntrinsic::setVolatile
void setVolatile(Constant *V)
Definition: IntrinsicInst.h:968
llvm::AtomicMemIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:887
llvm::ValueAsMetadata
Value wrapper in the Metadata hierarchy.
Definition: Metadata.h:345
llvm::BinaryOpIntrinsic::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:659
llvm::ConstrainedFPIntrinsic::getRoundingMode
Optional< RoundingMode > getRoundingMode() const
Definition: IntrinsicInst.cpp:200
DerivedTypes.h
llvm::IntrinsicInst::IntrinsicInst
IntrinsicInst()=delete
llvm::CallInst
This class represents a function call, abstracting a target machine's calling convention.
Definition: Instructions.h:1461
llvm::GCProjectionInst::isTiedToInvoke
bool isTiedToInvoke() const
Return true if this relocate is tied to the invoke statepoint.
Definition: IntrinsicInst.h:1377
llvm::VPIntrinsic::getMaskParam
Value * getMaskParam() const
Definition: IntrinsicInst.cpp:315
llvm::DILabel
Label.
Definition: DebugInfoMetadata.h:3148
llvm::MemTransferBase::getRawSourceUse
const Use & getRawSourceUse() const
Definition: IntrinsicInst.h:792
llvm::AnyMemTransferInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1150
llvm::User::getOperand
Value * getOperand(unsigned i) const
Definition: User.h:169
llvm::AtomicMemMoveInst
This class represents the atomic memmove intrinsic i.e.
Definition: IntrinsicInst.h:946
llvm::DbgLabelInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:384
llvm::DbgVariableIntrinsic::location_op_iterator::location_op_iterator
location_op_iterator(const location_op_iterator &R)
Definition: IntrinsicInst.h:163
llvm::PseudoProbeInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1316
llvm::DbgVariableIntrinsic::location_op_iterator::operator--
location_op_iterator & operator--()
Definition: IntrinsicInst.h:190
Value.h
llvm::AnyMemIntrinsic
Definition: IntrinsicInst.h:1084
llvm::MemSetBase::getValueUse
Use & getValueUse()
Definition: IntrinsicInst.h:853
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::MinMaxIntrinsic::getSaturationPoint
APInt getSaturationPoint(unsigned numBits) const
Min/max intrinsics are monotonic, they operate on a fixed-bitwidth values, so there is a certain thre...
Definition: IntrinsicInst.h:618
llvm::DbgAddrIntrinsic
This represents the llvm.dbg.addr instruction.
Definition: IntrinsicInst.h:329
llvm::APIntOps::smax
const APInt & smax(const APInt &A, const APInt &B)
Determine the larger of two APInts considered to be signed.
Definition: APInt.h:2132
llvm::DbgValueInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:364
llvm::DbgLabelInst::classof
static bool classof(const IntrinsicInst *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: IntrinsicInst.h:381
llvm::DbgValueInst::getValues
iterator_range< location_op_iterator > getValues() const
Definition: IntrinsicInst.h:355
llvm::AnyMemCpyInst
This class represents any memcpy intrinsic i.e.
Definition: IntrinsicInst.h:1158
llvm::GCProjectionInst::getStatepoint
const GCStatepointInst * getStatepoint() const
The statepoint with which this gc.relocate is associated.
Definition: IntrinsicInst.cpp:697
llvm::MinMaxIntrinsic::getRHS
Value * getRHS() const
Definition: IntrinsicInst.h:566
llvm::Use
A Use represents the edge between a Value definition and its users.
Definition: Use.h:43
llvm::AnyMemCpyInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1160
llvm::AnyMemCpyInst::classof
static bool classof(const Value *V)
Definition: IntrinsicInst.h:1170
llvm::MemTransferBase::getSource
Value * getSource() const
This is just like getRawSource, but it strips off any cast instructions that feed it,...
Definition: IntrinsicInst.h:800
llvm::SmallPtrSetImpl::insert
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
Definition: SmallPtrSet.h:365
llvm::Intrinsic::ID
unsigned ID
Definition: TargetTransformInfo.h:38
llvm::DbgVariableIntrinsic::isUndef
bool isUndef() const
Definition: IntrinsicInst.h:248
llvm::VAStartInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1197
llvm::RegState::Undef
@ Undef
Value of the register doesn't matter.
Definition: MachineInstrBuilder.h:52