LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs | Functions | Variables
APInt.h File Reference

This file implements a class to represent arbitrary precision integral constant values and operations on them. More...

#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
#include <climits>
#include <cstring>
#include <string>
Include dependency graph for APInt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::SmallVectorImpl< T >
 
class  llvm::APInt
 Class for arbitrary precision integers. More...
 
struct  llvm::APInt::ms
 Magic data for optimising signed division by a constant. More...
 
struct  llvm::APInt::mu
 Magic data for optimising unsigned division by a constant. More...
 

Namespaces

 llvm
 List of target independent CodeGen pass IDs.
 
 llvm::APIntOps
 

Typedefs

typedef uint64_t llvm::integerPart
 

Functions

bool llvm::operator== (uint64_t V1, const APInt &V2)
 
bool llvm::operator!= (uint64_t V1, const APInt &V2)
 
raw_ostream & llvm::operator<< (raw_ostream &OS, const APInt &I)
 
APInt llvm::APIntOps::smin (const APInt &A, const APInt &B)
 Determine the smaller of two APInts considered to be signed. More...
 
APInt llvm::APIntOps::smax (const APInt &A, const APInt &B)
 Determine the larger of two APInts considered to be signed. More...
 
APInt llvm::APIntOps::umin (const APInt &A, const APInt &B)
 Determine the smaller of two APInts considered to be signed. More...
 
APInt llvm::APIntOps::umax (const APInt &A, const APInt &B)
 Determine the larger of two APInts considered to be unsigned. More...
 
bool llvm::APIntOps::isIntN (unsigned N, const APInt &APIVal)
 Check if the specified APInt has a N-bits unsigned integer value. More...
 
bool llvm::APIntOps::isSignedIntN (unsigned N, const APInt &APIVal)
 Check if the specified APInt has a N-bits signed integer value. More...
 
bool llvm::APIntOps::isMask (unsigned numBits, const APInt &APIVal)
 
bool llvm::APIntOps::isShiftedMask (unsigned numBits, const APInt &APIVal)
 Return true if the argument APInt value contains a sequence of ones with the remainder zero. More...
 
APInt llvm::APIntOps::byteSwap (const APInt &APIVal)
 Returns a byte-swapped representation of the specified APInt Value. More...
 
unsigned llvm::APIntOps::logBase2 (const APInt &APIVal)
 Returns the floor log base 2 of the specified APInt value. More...
 
APInt llvm::APIntOps::GreatestCommonDivisor (const APInt &Val1, const APInt &Val2)
 Compute GCD of two APInt values. More...
 
double llvm::APIntOps::RoundAPIntToDouble (const APInt &APIVal)
 Converts the given APInt to a double value. More...
 
double llvm::APIntOps::RoundSignedAPIntToDouble (const APInt &APIVal)
 Converts the given APInt to a double value. More...
 
float llvm::APIntOps::RoundAPIntToFloat (const APInt &APIVal)
 Converts the given APInt to a float vlalue. More...
 
float llvm::APIntOps::RoundSignedAPIntToFloat (const APInt &APIVal)
 Converts the given APInt to a float value. More...
 
APInt llvm::APIntOps::RoundDoubleToAPInt (double Double, unsigned width)
 Converts the given double value into a APInt. More...
 
APInt llvm::APIntOps::RoundFloatToAPInt (float Float, unsigned width)
 Converts a float value into a APInt. More...
 
APInt llvm::APIntOps::ashr (const APInt &LHS, unsigned shiftAmt)
 Arithmetic right-shift function. More...
 
APInt llvm::APIntOps::lshr (const APInt &LHS, unsigned shiftAmt)
 Logical right-shift function. More...
 
APInt llvm::APIntOps::shl (const APInt &LHS, unsigned shiftAmt)
 Left-shift function. More...
 
APInt llvm::APIntOps::sdiv (const APInt &LHS, const APInt &RHS)
 Signed division function for APInt. More...
 
APInt llvm::APIntOps::udiv (const APInt &LHS, const APInt &RHS)
 Unsigned division function for APInt. More...
 
APInt llvm::APIntOps::srem (const APInt &LHS, const APInt &RHS)
 Function for signed remainder operation. More...
 
APInt llvm::APIntOps::urem (const APInt &LHS, const APInt &RHS)
 Function for unsigned remainder operation. More...
 
APInt llvm::APIntOps::mul (const APInt &LHS, const APInt &RHS)
 Function for multiplication operation. More...
 
APInt llvm::APIntOps::add (const APInt &LHS, const APInt &RHS)
 Function for addition operation. More...
 
APInt llvm::APIntOps::sub (const APInt &LHS, const APInt &RHS)
 Function for subtraction operation. More...
 
APInt llvm::APIntOps::And (const APInt &LHS, const APInt &RHS)
 Bitwise AND function for APInt. More...
 
APInt llvm::APIntOps::Or (const APInt &LHS, const APInt &RHS)
 Bitwise OR function for APInt. More...
 
APInt llvm::APIntOps::Xor (const APInt &LHS, const APInt &RHS)
 Bitwise XOR function for APInt. More...
 
APInt llvm::APIntOps::Not (const APInt &APIVal)
 Bitwise complement function. More...
 
hash_code llvm::hash_value (const APInt &Arg)
 

Variables

const unsigned int llvm::host_char_bit = 8
 
const unsigned int llvm::integerPartWidth
 

Detailed Description

This file implements a class to represent arbitrary precision integral constant values and operations on them.

Definition in file APInt.h.