LLVM  6.0.0svn
Operator.h
Go to the documentation of this file.
1 //===-- llvm/Operator.h - Operator utility subclass -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines various classes for working with Instructions and
11 // ConstantExprs.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_IR_OPERATOR_H
16 #define LLVM_IR_OPERATOR_H
17 
18 #include "llvm/ADT/None.h"
19 #include "llvm/ADT/Optional.h"
20 #include "llvm/IR/Constants.h"
21 #include "llvm/IR/Instruction.h"
22 #include "llvm/IR/Type.h"
23 #include "llvm/IR/Value.h"
24 #include "llvm/Support/Casting.h"
25 #include <cstddef>
26 
27 namespace llvm {
28 
29 /// This is a utility class that provides an abstraction for the common
30 /// functionality between Instructions and ConstantExprs.
31 class Operator : public User {
32 public:
33  // The Operator class is intended to be used as a utility, and is never itself
34  // instantiated.
35  Operator() = delete;
36  ~Operator() = delete;
37 
38  void *operator new(size_t s) = delete;
39 
40  /// Return the opcode for this Instruction or ConstantExpr.
41  unsigned getOpcode() const {
42  if (const Instruction *I = dyn_cast<Instruction>(this))
43  return I->getOpcode();
44  return cast<ConstantExpr>(this)->getOpcode();
45  }
46 
47  /// If V is an Instruction or ConstantExpr, return its opcode.
48  /// Otherwise return UserOp1.
49  static unsigned getOpcode(const Value *V) {
50  if (const Instruction *I = dyn_cast<Instruction>(V))
51  return I->getOpcode();
52  if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
53  return CE->getOpcode();
54  return Instruction::UserOp1;
55  }
56 
57  static bool classof(const Instruction *) { return true; }
58  static bool classof(const ConstantExpr *) { return true; }
59  static bool classof(const Value *V) {
60  return isa<Instruction>(V) || isa<ConstantExpr>(V);
61  }
62 };
63 
64 /// Utility class for integer arithmetic operators which may exhibit overflow -
65 /// Add, Sub, and Mul. It does not include SDiv, despite that operator having
66 /// the potential for overflow.
68 public:
69  enum {
70  NoUnsignedWrap = (1 << 0),
71  NoSignedWrap = (1 << 1)
72  };
73 
74 private:
75  friend class Instruction;
76  friend class ConstantExpr;
77 
78  void setHasNoUnsignedWrap(bool B) {
80  (SubclassOptionalData & ~NoUnsignedWrap) | (B * NoUnsignedWrap);
81  }
82  void setHasNoSignedWrap(bool B) {
84  (SubclassOptionalData & ~NoSignedWrap) | (B * NoSignedWrap);
85  }
86 
87 public:
88  /// Test whether this operation is known to never
89  /// undergo unsigned overflow, aka the nuw property.
90  bool hasNoUnsignedWrap() const {
91  return SubclassOptionalData & NoUnsignedWrap;
92  }
93 
94  /// Test whether this operation is known to never
95  /// undergo signed overflow, aka the nsw property.
96  bool hasNoSignedWrap() const {
97  return (SubclassOptionalData & NoSignedWrap) != 0;
98  }
99 
100  static bool classof(const Instruction *I) {
101  return I->getOpcode() == Instruction::Add ||
102  I->getOpcode() == Instruction::Sub ||
103  I->getOpcode() == Instruction::Mul ||
104  I->getOpcode() == Instruction::Shl;
105  }
106  static bool classof(const ConstantExpr *CE) {
107  return CE->getOpcode() == Instruction::Add ||
108  CE->getOpcode() == Instruction::Sub ||
109  CE->getOpcode() == Instruction::Mul ||
110  CE->getOpcode() == Instruction::Shl;
111  }
112  static bool classof(const Value *V) {
113  return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
114  (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
115  }
116 };
117 
118 /// A udiv or sdiv instruction, which can be marked as "exact",
119 /// indicating that no bits are destroyed.
121 public:
122  enum {
123  IsExact = (1 << 0)
124  };
125 
126 private:
127  friend class Instruction;
128  friend class ConstantExpr;
129 
130  void setIsExact(bool B) {
131  SubclassOptionalData = (SubclassOptionalData & ~IsExact) | (B * IsExact);
132  }
133 
134 public:
135  /// Test whether this division is known to be exact, with zero remainder.
136  bool isExact() const {
137  return SubclassOptionalData & IsExact;
138  }
139 
140  static bool isPossiblyExactOpcode(unsigned OpC) {
141  return OpC == Instruction::SDiv ||
142  OpC == Instruction::UDiv ||
143  OpC == Instruction::AShr ||
144  OpC == Instruction::LShr;
145  }
146 
147  static bool classof(const ConstantExpr *CE) {
148  return isPossiblyExactOpcode(CE->getOpcode());
149  }
150  static bool classof(const Instruction *I) {
151  return isPossiblyExactOpcode(I->getOpcode());
152  }
153  static bool classof(const Value *V) {
154  return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
155  (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
156  }
157 };
158 
159 /// Convenience struct for specifying and reasoning about fast-math flags.
161 private:
162  friend class FPMathOperator;
163 
164  unsigned Flags = 0;
165 
166  FastMathFlags(unsigned F) : Flags(F) { }
167 
168 public:
169  /// This is how the bits are used in Value::SubclassOptionalData so they
170  /// should fit there too.
171  enum {
172  UnsafeAlgebra = (1 << 0),
173  NoNaNs = (1 << 1),
174  NoInfs = (1 << 2),
175  NoSignedZeros = (1 << 3),
176  AllowReciprocal = (1 << 4),
177  AllowContract = (1 << 5)
178  };
179 
180  FastMathFlags() = default;
181 
182  /// Whether any flag is set
183  bool any() const { return Flags != 0; }
184 
185  /// Set all the flags to false
186  void clear() { Flags = 0; }
187 
188  /// Flag queries
189  bool noNaNs() const { return 0 != (Flags & NoNaNs); }
190  bool noInfs() const { return 0 != (Flags & NoInfs); }
191  bool noSignedZeros() const { return 0 != (Flags & NoSignedZeros); }
192  bool allowReciprocal() const { return 0 != (Flags & AllowReciprocal); }
193  bool allowContract() const { return 0 != (Flags & AllowContract); }
194  bool unsafeAlgebra() const { return 0 != (Flags & UnsafeAlgebra); }
195 
196  /// Flag setters
197  void setNoNaNs() { Flags |= NoNaNs; }
198  void setNoInfs() { Flags |= NoInfs; }
199  void setNoSignedZeros() { Flags |= NoSignedZeros; }
200  void setAllowReciprocal() { Flags |= AllowReciprocal; }
201  void setAllowContract(bool B) {
202  Flags = (Flags & ~AllowContract) | B * AllowContract;
203  }
205  Flags |= UnsafeAlgebra;
206  setNoNaNs();
207  setNoInfs();
208  setNoSignedZeros();
209  setAllowReciprocal();
210  setAllowContract(true);
211  }
212 
213  void operator&=(const FastMathFlags &OtherFlags) {
214  Flags &= OtherFlags.Flags;
215  }
216 };
217 
218 /// Utility class for floating point operations which can have
219 /// information about relaxed accuracy requirements attached to them.
220 class FPMathOperator : public Operator {
221 private:
222  friend class Instruction;
223 
224  void setHasUnsafeAlgebra(bool B) {
226  (SubclassOptionalData & ~FastMathFlags::UnsafeAlgebra) |
228 
229  // Unsafe algebra implies all the others
230  if (B) {
231  setHasNoNaNs(true);
232  setHasNoInfs(true);
233  setHasNoSignedZeros(true);
234  setHasAllowReciprocal(true);
235  }
236  }
237 
238  void setHasNoNaNs(bool B) {
240  (SubclassOptionalData & ~FastMathFlags::NoNaNs) |
241  (B * FastMathFlags::NoNaNs);
242  }
243 
244  void setHasNoInfs(bool B) {
246  (SubclassOptionalData & ~FastMathFlags::NoInfs) |
247  (B * FastMathFlags::NoInfs);
248  }
249 
250  void setHasNoSignedZeros(bool B) {
252  (SubclassOptionalData & ~FastMathFlags::NoSignedZeros) |
254  }
255 
256  void setHasAllowReciprocal(bool B) {
258  (SubclassOptionalData & ~FastMathFlags::AllowReciprocal) |
260  }
261 
262  void setHasAllowContract(bool B) {
264  (SubclassOptionalData & ~FastMathFlags::AllowContract) |
266  }
267 
268  /// Convenience function for setting multiple fast-math flags.
269  /// FMF is a mask of the bits to set.
270  void setFastMathFlags(FastMathFlags FMF) {
271  SubclassOptionalData |= FMF.Flags;
272  }
273 
274  /// Convenience function for copying all fast-math flags.
275  /// All values in FMF are transferred to this operator.
276  void copyFastMathFlags(FastMathFlags FMF) {
277  SubclassOptionalData = FMF.Flags;
278  }
279 
280 public:
281  /// Test whether this operation is permitted to be
282  /// algebraically transformed, aka the 'A' fast-math property.
283  bool hasUnsafeAlgebra() const {
284  return (SubclassOptionalData & FastMathFlags::UnsafeAlgebra) != 0;
285  }
286 
287  /// Test whether this operation's arguments and results are to be
288  /// treated as non-NaN, aka the 'N' fast-math property.
289  bool hasNoNaNs() const {
291  }
292 
293  /// Test whether this operation's arguments and results are to be
294  /// treated as NoN-Inf, aka the 'I' fast-math property.
295  bool hasNoInfs() const {
297  }
298 
299  /// Test whether this operation can treat the sign of zero
300  /// as insignificant, aka the 'S' fast-math property.
301  bool hasNoSignedZeros() const {
303  }
304 
305  /// Test whether this operation is permitted to use
306  /// reciprocal instead of division, aka the 'R' fast-math property.
307  bool hasAllowReciprocal() const {
309  }
310 
311  /// Test whether this operation is permitted to
312  /// be floating-point contracted.
313  bool hasAllowContract() const {
315  }
316 
317  /// Convenience function for getting all the fast-math flags
320  }
321 
322  /// Get the maximum error permitted by this operation in ULPs. An accuracy of
323  /// 0.0 means that the operation should be performed with the default
324  /// precision.
325  float getFPAccuracy() const;
326 
327  static bool classof(const Instruction *I) {
328  return I->getType()->isFPOrFPVectorTy() ||
329  I->getOpcode() == Instruction::FCmp;
330  }
331 
332  static bool classof(const ConstantExpr *CE) {
333  return CE->getType()->isFPOrFPVectorTy() ||
334  CE->getOpcode() == Instruction::FCmp;
335  }
336 
337  static bool classof(const Value *V) {
338  return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
339  (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
340  }
341 };
342 
343 /// A helper template for defining operators for individual opcodes.
344 template<typename SuperClass, unsigned Opc>
345 class ConcreteOperator : public SuperClass {
346 public:
347  static bool classof(const Instruction *I) {
348  return I->getOpcode() == Opc;
349  }
350  static bool classof(const ConstantExpr *CE) {
351  return CE->getOpcode() == Opc;
352  }
353  static bool classof(const Value *V) {
354  return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
355  (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
356  }
357 };
358 
360  : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
361 };
363  : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
364 };
366  : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
367 };
369  : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
370 };
371 
373  : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {
374 };
376  : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {
377 };
379  : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {
380 };
382  : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {
383 };
384 
385 class ZExtOperator : public ConcreteOperator<Operator, Instruction::ZExt> {};
386 
388  : public ConcreteOperator<Operator, Instruction::GetElementPtr> {
389  friend class GetElementPtrInst;
390  friend class ConstantExpr;
391 
392  enum {
393  IsInBounds = (1 << 0),
394  // InRangeIndex: bits 1-6
395  };
396 
397  void setIsInBounds(bool B) {
399  (SubclassOptionalData & ~IsInBounds) | (B * IsInBounds);
400  }
401 
402 public:
403  /// Test whether this is an inbounds GEP, as defined by LangRef.html.
404  bool isInBounds() const {
405  return SubclassOptionalData & IsInBounds;
406  }
407 
408  /// Returns the offset of the index with an inrange attachment, or None if
409  /// none.
411  if (SubclassOptionalData >> 1 == 0) return None;
412  return (SubclassOptionalData >> 1) - 1;
413  }
414 
415  inline op_iterator idx_begin() { return op_begin()+1; }
416  inline const_op_iterator idx_begin() const { return op_begin()+1; }
417  inline op_iterator idx_end() { return op_end(); }
418  inline const_op_iterator idx_end() const { return op_end(); }
419 
421  return getOperand(0);
422  }
423  const Value *getPointerOperand() const {
424  return getOperand(0);
425  }
426  static unsigned getPointerOperandIndex() {
427  return 0U; // get index for modifying correct operand
428  }
429 
430  /// Method to return the pointer operand as a PointerType.
432  return getPointerOperand()->getType();
433  }
434 
435  Type *getSourceElementType() const;
436  Type *getResultElementType() const;
437 
438  /// Method to return the address space of the pointer operand.
439  unsigned getPointerAddressSpace() const {
440  return getPointerOperandType()->getPointerAddressSpace();
441  }
442 
443  unsigned getNumIndices() const { // Note: always non-negative
444  return getNumOperands() - 1;
445  }
446 
447  bool hasIndices() const {
448  return getNumOperands() > 1;
449  }
450 
451  /// Return true if all of the indices of this GEP are zeros.
452  /// If so, the result pointer and the first operand have the same
453  /// value, just potentially different types.
454  bool hasAllZeroIndices() const {
455  for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) {
456  if (ConstantInt *C = dyn_cast<ConstantInt>(I))
457  if (C->isZero())
458  continue;
459  return false;
460  }
461  return true;
462  }
463 
464  /// Return true if all of the indices of this GEP are constant integers.
465  /// If so, the result pointer and the first operand have
466  /// a constant offset between them.
467  bool hasAllConstantIndices() const {
468  for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) {
469  if (!isa<ConstantInt>(I))
470  return false;
471  }
472  return true;
473  }
474 
475  /// \brief Accumulate the constant address offset of this GEP if possible.
476  ///
477  /// This routine accepts an APInt into which it will accumulate the constant
478  /// offset of this GEP if the GEP is in fact constant. If the GEP is not
479  /// all-constant, it returns false and the value of the offset APInt is
480  /// undefined (it is *not* preserved!). The APInt passed into this routine
481  /// must be at exactly as wide as the IntPtr type for the address space of the
482  /// base GEP pointer.
483  bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const;
484 };
485 
487  : public ConcreteOperator<Operator, Instruction::PtrToInt> {
488  friend class PtrToInt;
489  friend class ConstantExpr;
490 
491 public:
493  return getOperand(0);
494  }
495  const Value *getPointerOperand() const {
496  return getOperand(0);
497  }
498 
499  static unsigned getPointerOperandIndex() {
500  return 0U; // get index for modifying correct operand
501  }
502 
503  /// Method to return the pointer operand as a PointerType.
505  return getPointerOperand()->getType();
506  }
507 
508  /// Method to return the address space of the pointer operand.
509  unsigned getPointerAddressSpace() const {
510  return cast<PointerType>(getPointerOperandType())->getAddressSpace();
511  }
512 };
513 
515  : public ConcreteOperator<Operator, Instruction::BitCast> {
516  friend class BitCastInst;
517  friend class ConstantExpr;
518 
519 public:
520  Type *getSrcTy() const {
521  return getOperand(0)->getType();
522  }
523 
524  Type *getDestTy() const {
525  return getType();
526  }
527 };
528 
529 } // end namespace llvm
530 
531 #endif // LLVM_IR_OPERATOR_H
bool hasIndices() const
Definition: Operator.h:447
uint64_t CallInst * C
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:109
static bool classof(const Instruction *I)
Definition: Operator.h:347
static bool classof(const ConstantExpr *CE)
Definition: Operator.h:332
unsigned getOpcode() const
Return the opcode at the root of this constant expression.
Definition: Constants.h:1171
bool hasNoNaNs() const
Test whether this operation&#39;s arguments and results are to be treated as non-NaN, aka the &#39;N&#39; fast-ma...
Definition: Operator.h:289
bool hasNoInfs() const
Test whether this operation&#39;s arguments and results are to be treated as NoN-Inf, aka the &#39;I&#39; fast-ma...
Definition: Operator.h:295
bool noNaNs() const
Flag queries.
Definition: Operator.h:189
static bool classof(const Value *V)
Definition: Operator.h:59
void setNoSignedZeros()
Definition: Operator.h:199
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
void setNoNaNs()
Flag setters.
Definition: Operator.h:197
static bool classof(const ConstantExpr *)
Definition: Operator.h:58
static unsigned getOpcode(const Value *V)
If V is an Instruction or ConstantExpr, return its opcode.
Definition: Operator.h:49
unsigned getPointerAddressSpace() const
Method to return the address space of the pointer operand.
Definition: Operator.h:509
void setAllowContract(bool B)
Definition: Operator.h:201
static bool classof(const Instruction *)
Definition: Operator.h:57
Optional< unsigned > getInRangeIndex() const
Returns the offset of the index with an inrange attachment, or None if none.
Definition: Operator.h:410
unsigned getPointerAddressSpace() const
Method to return the address space of the pointer operand.
Definition: Operator.h:439
bool noInfs() const
Definition: Operator.h:190
bool hasAllowContract() const
Test whether this operation is permitted to be floating-point contracted.
Definition: Operator.h:313
bool unsafeAlgebra() const
Definition: Operator.h:194
op_iterator idx_end()
Definition: Operator.h:417
op_iterator op_begin()
Definition: User.h:214
static Value * getPointerOperand(Instruction &Inst)
static bool classof(const Value *V)
Definition: Operator.h:112
A Use represents the edge between a Value definition and its users.
Definition: Use.h:56
static bool classof(const Instruction *I)
Definition: Operator.h:100
Type * getPointerOperandType() const
Method to return the pointer operand as a PointerType.
Definition: Operator.h:431
static bool classof(const Value *V)
Definition: Operator.h:337
bool hasAllowReciprocal() const
Test whether this operation is permitted to use reciprocal instead of division, aka the &#39;R&#39; fast-math...
Definition: Operator.h:307
Value * getPointerOperand()
Definition: Operator.h:492
static unsigned getPointerOperandIndex()
Definition: Operator.h:426
bool isExact() const
Test whether this division is known to be exact, with zero remainder.
Definition: Operator.h:136
static bool classof(const ConstantExpr *CE)
Definition: Operator.h:106
A constant value that is initialized with an expression using other constant values.
Definition: Constants.h:862
#define F(x, y, z)
Definition: MD5.cpp:55
Type * getType() const
All values are typed, get the type of this value.
Definition: Value.h:245
static bool classof(const Value *V)
Definition: Operator.h:153
unsigned getNumIndices() const
Definition: Operator.h:443
bool isInBounds() const
Test whether this is an inbounds GEP, as defined by LangRef.html.
Definition: Operator.h:404
This class represents a no-op cast from one type to another.
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
Definition: Instruction.h:121
bool allowContract() const
Definition: Operator.h:193
static bool classof(const Instruction *I)
Definition: Operator.h:327
Value * getOperand(unsigned i) const
Definition: User.h:154
const Value * getPointerOperand() const
Definition: Operator.h:495
an instruction for type-safe pointer arithmetic to access elements of arrays and structs ...
Definition: Instructions.h:837
FastMathFlags getFastMathFlags() const
Convenience function for getting all the fast-math flags.
Definition: Operator.h:318
bool hasAllZeroIndices() const
Return true if all of the indices of this GEP are zeros.
Definition: Operator.h:454
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
bool any() const
Whether any flag is set.
Definition: Operator.h:183
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Operator()=delete
A udiv or sdiv instruction, which can be marked as "exact", indicating that no bits are destroyed...
Definition: Operator.h:120
void setUnsafeAlgebra()
Definition: Operator.h:204
op_iterator op_end()
Definition: User.h:216
Utility class for integer arithmetic operators which may exhibit overflow - Add, Sub, and Mul.
Definition: Operator.h:67
Value * getPointerOperand()
Definition: Operator.h:420
bool allowReciprocal() const
Definition: Operator.h:192
static bool classof(const Value *V)
Definition: Operator.h:353
~Operator()=delete
static bool isPossiblyExactOpcode(unsigned OpC)
Definition: Operator.h:140
op_iterator idx_begin()
Definition: Operator.h:415
unsigned char SubclassOptionalData
Hold subclass data that can be dropped.
Definition: Value.h:91
Type * getPointerOperandType() const
Method to return the pointer operand as a PointerType.
Definition: Operator.h:504
unsigned getNumOperands() const
Definition: User.h:176
bool hasNoSignedZeros() const
Test whether this operation can treat the sign of zero as insignificant, aka the &#39;S&#39; fast-math proper...
Definition: Operator.h:301
static bool classof(const ConstantExpr *CE)
Definition: Operator.h:147
#define E
Definition: LargeTest.cpp:27
This is the shared class of boolean and integer constants.
Definition: Constants.h:84
#define B
Definition: LargeTest.cpp:24
Type * getDestTy() const
Definition: Operator.h:524
A helper template for defining operators for individual opcodes.
Definition: Operator.h:345
void setAllowReciprocal()
Definition: Operator.h:200
Utility class for floating point operations which can have information about relaxed accuracy require...
Definition: Operator.h:220
This is a utility class that provides an abstraction for the common functionality between Instruction...
Definition: Operator.h:31
bool hasAllConstantIndices() const
Return true if all of the indices of this GEP are constant integers.
Definition: Operator.h:467
Type * getSrcTy() const
Definition: Operator.h:520
Class for arbitrary precision integers.
Definition: APInt.h:69
bool hasNoSignedWrap() const
Test whether this operation is known to never undergo signed overflow, aka the nsw property...
Definition: Operator.h:96
static bool classof(const Instruction *I)
Definition: Operator.h:150
void clear()
Set all the flags to false.
Definition: Operator.h:186
static std::vector< std::string > Flags
Definition: FlagsTest.cpp:8
const_op_iterator idx_end() const
Definition: Operator.h:418
#define I(x, y, z)
Definition: MD5.cpp:58
const_op_iterator idx_begin() const
Definition: Operator.h:416
static unsigned getPointerOperandIndex()
Definition: Operator.h:499
const Value * getPointerOperand() const
Definition: Operator.h:423
static bool classof(const ConstantExpr *CE)
Definition: Operator.h:350
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
Definition: Type.h:185
bool hasUnsafeAlgebra() const
Test whether this operation is permitted to be algebraically transformed, aka the &#39;A&#39; fast-math prope...
Definition: Operator.h:283
LLVM Value Representation.
Definition: Value.h:73
E & operator &=(E &LHS, E RHS)
Definition: BitmaskEnum.h:134
unsigned getOpcode() const
Return the opcode for this Instruction or ConstantExpr.
Definition: Operator.h:41
Convenience struct for specifying and reasoning about fast-math flags.
Definition: Operator.h:160
bool noSignedZeros() const
Definition: Operator.h:191
bool hasNoUnsignedWrap() const
Test whether this operation is known to never undergo unsigned overflow, aka the nuw property...
Definition: Operator.h:90