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