LLVM API Documentation

Constants.cpp File Reference

#include "LLVMContextImpl.h"
#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/Operator.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/System/Mutex.h"
#include "llvm/System/RWMutex.h"
#include "llvm/System/Threading.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

Functions

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

Variables

static const uint64_t zero [2] = {0, 0}


Function Documentation

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

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

Definition at line 1991 of file Constants.cpp.

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

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

Definition at line 1915 of file Constants.cpp.

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

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

replaceUsesOfWithOnConstant - Update this constant array to change uses of 'From' to be uses of 'To'. This must update the uniquing data structures etc.

Note that we intentionally replace all uses of From with To here. Consider a large array that uses 'From' 1000 times. By handling this case all here, ConstantArray::replaceUsesOfWithOnConstant is only invoked once, and that single invocation handles all 1000 uses. Handling them one at a time would work, but would be really slow because it would have to unique each updated array instance.

Definition at line 1820 of file Constants.cpp.

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

static ExprMapKeyType getValType ( ConstantExpr *  CE  )  [static]

static char getValType ( UndefValue *   )  [static]

Definition at line 1007 of file Constants.cpp.

static char getValType ( ConstantPointerNull *   )  [static]

Definition at line 985 of file Constants.cpp.

static char getValType ( ConstantAggregateZero *  CPZ  )  [static]

Definition at line 855 of file Constants.cpp.

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


Variable Documentation

const uint64_t zero[2] = {0, 0} [static]