LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
llvm::OverflowingBinaryOperator Class Reference

#include <Operator.h>

Inheritance diagram for llvm::OverflowingBinaryOperator:
Inheritance graph
[legend]
Collaboration diagram for llvm::OverflowingBinaryOperator:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { NoUnsignedWrap = (1 << 0), NoSignedWrap = (1 << 1) }

Public Member Functions

bool hasNoUnsignedWrap () const
bool hasNoSignedWrap () const

Static Public Member Functions

static bool classof (const Instruction *I)
static bool classof (const ConstantExpr *CE)
static bool classof (const Value *V)

Friends

class BinaryOperator
class ConstantExpr

Detailed Description

OverflowingBinaryOperator - Utility class for integer arithmetic operators which may exhibit overflow - Add, Sub, and Mul. It does not include SDiv, despite that operator having the potential for overflow.

Definition at line 79 of file Operator.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NoUnsignedWrap 
NoSignedWrap 

Definition at line 81 of file Operator.h.


Member Function Documentation

static bool llvm::OverflowingBinaryOperator::classof ( const Value V) [inline, static]

hasNoSignedWrap - Test whether this operation is known to never undergo signed overflow, aka the nsw property.

Definition at line 107 of file Operator.h.

References NoSignedWrap, and llvm::Value::SubclassOptionalData.

Referenced by DecomposeSimpleLinearExpr(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), MaintainNoSignedWrap(), and SimplifyDiv().

hasNoUnsignedWrap - Test whether this operation is known to never undergo unsigned overflow, aka the nuw property.

Definition at line 101 of file Operator.h.

References NoUnsignedWrap, and llvm::Value::SubclassOptionalData.

Referenced by DecomposeSimpleLinearExpr(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), and SimplifyDiv().


Friends And Related Function Documentation

friend class BinaryOperator [friend]

Definition at line 87 of file Operator.h.

friend class ConstantExpr [friend]

Definition at line 88 of file Operator.h.


The documentation for this class was generated from the following file: