LLVM API Documentation

Constants.cpp File Reference

#include "llvm/Constants.h"
#include "ConstantFold.h"
#include "llvm/DerivedTypes.h"
#include "llvm/GlobalValue.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include <algorithm>
#include <map>

Include dependency graph for Constants.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  llvm::OperandTraits< UnaryConstantExpr >
struct  llvm::OperandTraits< BinaryConstantExpr >
struct  llvm::OperandTraits< SelectConstantExpr >
struct  llvm::OperandTraits< ExtractElementConstantExpr >
struct  llvm::OperandTraits< InsertElementConstantExpr >
struct  llvm::OperandTraits< ShuffleVectorConstantExpr >
struct  llvm::OperandTraits< ExtractValueConstantExpr >
struct  llvm::OperandTraits< InsertValueConstantExpr >
struct  llvm::OperandTraits< GetElementPtrConstantExpr >
struct  llvm::OperandTraits< CompareConstantExpr >
struct  llvm::ConstantTraits< std::vector< T, Alloc > >
struct  llvm::ConstantCreator< ConstantClass, TypeClass, ValType >
struct  llvm::ConvertConstantType< ConstantClass, TypeClass >
class  llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >
struct  llvm::ConstantCreator< ConstantAggregateZero, Type, ValType >
struct  llvm::ConvertConstantType< ConstantAggregateZero, Type >
struct  llvm::ConvertConstantType< ConstantArray, ArrayType >
struct  llvm::ConvertConstantType< ConstantStruct, StructType >
struct  llvm::ConvertConstantType< ConstantVector, VectorType >
struct  llvm::ConstantCreator< ConstantPointerNull, PointerType, ValType >
struct  llvm::ConvertConstantType< ConstantPointerNull, PointerType >
struct  llvm::ConstantCreator< UndefValue, Type, ValType >
struct  llvm::ConvertConstantType< UndefValue, Type >
struct  llvm::ConstantCreator< ConstantExpr, Type, ExprMapKeyType >
struct  llvm::ConvertConstantType< ConstantExpr, Type >

Typedefs

typedef DenseMap
< DenseMapAPIntKeyInfo::KeyTy,
ConstantInt
*, DenseMapAPIntKeyInfo > 
IntMapTy
typedef DenseMap
< DenseMapAPFloatKeyInfo::KeyTy,
ConstantFP
*, DenseMapAPFloatKeyInfo > 
FPMapTy
typedef ValueMap< std::vector
< Constant * >, ArrayType,
ConstantArray, true > 
ArrayConstantsTy
typedef ValueMap< std::vector
< Constant * >, StructType,
ConstantStruct, true > 
StructConstantsTy

Functions

void llvm::CleanupTrueFalse (void *)
static const fltSemantics * TypeToFloatSemantics (const Type *Ty)
static char getValType (ConstantAggregateZero *CPZ)
static std::vector< Constant * > getValType (ConstantArray *CA)
static std::vector< Constant * > getValType (ConstantStruct *CS)
static std::vector< Constant * > getValType (ConstantVector *CP)
static char getValType (ConstantPointerNull *)
static char getValType (UndefValue *)
static ExprMapKeyType getValType (ConstantExpr *CE)
static Constant * getFoldedCast (Instruction::CastOps opc, Constant *C, const Type *Ty)

Variables

static ManagedCleanup
< llvm::CleanupTrueFalse > 
TrueFalseCleanup
static ManagedStatic< IntMapTy > IntConstants
static ManagedStatic< FPMapTy > FPConstants
static ManagedStatic< ValueMap
< char, Type,
ConstantAggregateZero > > 
AggZeroConstants
static ManagedStatic
< ArrayConstantsTy > 
ArrayConstants
static ManagedStatic
< StructConstantsTy > 
StructConstants
static ManagedStatic< ValueMap
< std::vector< Constant * >
, VectorType, ConstantVector > > 
VectorConstants
static ManagedStatic< ValueMap
< char, PointerType,
ConstantPointerNull > > 
NullPtrConstants
static ManagedStatic< ValueMap
< char, Type, UndefValue > > 
UndefValueConstants
static ManagedStatic< ValueMap
< ExprMapKeyType, Type,
ConstantExpr > > 
ExprConstants


Typedef Documentation

typedef ValueMap<std::vector<Constant*>, ArrayType, ConstantArray, true > ArrayConstantsTy

Definition at line 1311 of file Constants.cpp.

typedef DenseMap<DenseMapAPFloatKeyInfo::KeyTy, ConstantFP*, DenseMapAPFloatKeyInfo> FPMapTy

Definition at line 345 of file Constants.cpp.

typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, DenseMapAPIntKeyInfo> IntMapTy

Definition at line 249 of file Constants.cpp.

typedef ValueMap<std::vector<Constant*>, StructType, ConstantStruct, true > StructConstantsTy

Definition at line 1426 of file Constants.cpp.


Function Documentation

static Constant* getFoldedCast ( Instruction::CastOps  opc,
Constant *  C,
const Type *  Ty 
) [inline, static]

static ExprMapKeyType getValType ( ConstantExpr *  CE  )  [static]

static char getValType ( UndefValue *   )  [static]

Definition at line 1624 of file Constants.cpp.

static char getValType ( ConstantPointerNull *   )  [static]

Definition at line 1581 of file Constants.cpp.

static std::vector<Constant*> getValType ( ConstantVector *  CP  )  [static]

Definition at line 1480 of file Constants.cpp.

References llvm::User::getNumOperands(), and llvm::Constant::getOperand().

static std::vector<Constant*> getValType ( ConstantStruct *  CS  )  [static]

Definition at line 1429 of file Constants.cpp.

References llvm::User::getNumOperands(), and llvm::Constant::getOperand().

static std::vector<Constant*> getValType ( ConstantArray *  CA  )  [static]

Definition at line 1302 of file Constants.cpp.

References llvm::User::getNumOperands(), and llvm::Constant::getOperand().

static char getValType ( ConstantAggregateZero *  CPZ  )  [static]

Definition at line 1269 of file Constants.cpp.

static const fltSemantics* TypeToFloatSemantics ( const Type *  Ty  )  [static]


Variable Documentation

Definition at line 1267 of file Constants.cpp.

Definition at line 1312 of file Constants.cpp.

ManagedStatic<ValueMap<ExprMapKeyType, Type, ConstantExpr> > ExprConstants [static]

Definition at line 1790 of file Constants.cpp.

Definition at line 347 of file Constants.cpp.

IndexList indices

Definition at line 1657 of file Constants.cpp.

Definition at line 250 of file Constants.cpp.

Definition at line 1579 of file Constants.cpp.

uint16_t opcode

Definition at line 1654 of file Constants.cpp.

std::vector<Constant*> operands

Definition at line 1656 of file Constants.cpp.

uint16_t predicate

Definition at line 644 of file Constants.cpp.

Definition at line 1427 of file Constants.cpp.

ManagedCleanup<llvm::CleanupTrueFalse> TrueFalseCleanup [static]

Definition at line 206 of file Constants.cpp.

const Type* type

Definition at line 224 of file Constants.cpp.

Definition at line 1622 of file Constants.cpp.

Definition at line 1489 of file Constants.cpp.