LLVM API Documentation

Constants.cpp File Reference

#include "llvm/Constants.h"
#include "ConstantFolding.h"
#include "llvm/DerivedTypes.h"
#include "llvm/GlobalValue.h"
#include "llvm/Instructions.h"
#include "llvm/SymbolTable.h"
#include "llvm/Module.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Visibility.h"
#include <algorithm>
#include <iostream>

Include dependency graph for Constants.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  llvm::ConstantCreator< ConstantClass, TypeClass, ValType >
struct  llvm::ConvertConstantType< ConstantClass, TypeClass >
class  llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >
struct  llvm::ConstantCreator< ConstantFP, Type, uint64_t >
struct  llvm::ConstantCreator< ConstantFP, Type, uint32_t >
struct  llvm::ConstantCreator< ConstantAggregateZero, Type, ValType >
struct  llvm::ConvertConstantType< ConstantAggregateZero, Type >
struct  llvm::ConvertConstantType< ConstantArray, ArrayType >
struct  llvm::ConvertConstantType< ConstantStruct, StructType >
struct  llvm::ConvertConstantType< ConstantPacked, PackedType >
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 ValueMap< std::vector<
Constant * >, ArrayType,
ConstantArray, true > 
ArrayConstantsTy
typedef ValueMap< std::vector<
Constant * >, StructType,
ConstantStruct, true > 
StructConstantsTy
typedef std::pair< unsigned,
std::vector< Constant * > > 
ExprMapKeyType

Functions

static bool isSetCC (unsigned Opcode)
static char getValType (ConstantAggregateZero *CPZ)
static std::vector< Constant * > getValType (ConstantArray *CA)
static std::vector< Constant * > getValType (ConstantStruct *CS)
static std::vector< Constant * > getValType (ConstantPacked *CP)
static char getValType (ConstantPointerNull *)
static char getValType (UndefValue *)
static ExprMapKeyType getValType (ConstantExpr *CE)

Variables

static ValueMap< int64_t,
Type, ConstantSInt
SIntConstants
static ValueMap< uint64_t,
Type, ConstantUInt
UIntConstants
static ValueMap< uint64_t,
Type, ConstantFP
DoubleConstants
static ValueMap< uint32_t,
Type, ConstantFP
FloatConstants
static ValueMap< char, Type,
ConstantAggregateZero
AggZeroConstants
static ArrayConstantsTy ArrayConstants
static StructConstantsTy StructConstants
static ValueMap< std::vector<
Constant * >, PackedType,
ConstantPacked
PackedConstants
static ValueMap< char, PointerType,
ConstantPointerNull
NullPtrConstants
static ValueMap< char, Type,
UndefValue
UndefValueConstants
static ValueMap< ExprMapKeyType,
Type, ConstantExpr
ExprConstants


Typedef Documentation

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

Definition at line 1007 of file Constants.cpp.

typedef std::pair<unsigned, std::vector<Constant*> > ExprMapKeyType

Definition at line 1281 of file Constants.cpp.

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

Definition at line 1100 of file Constants.cpp.


Function Documentation

static ExprMapKeyType getValType ( ConstantExpr CE  )  [static]

Definition at line 1350 of file Constants.cpp.

References llvm::User::getNumOperands(), llvm::ConstantExpr::getOpcode(), and llvm::ConstantExpr::getOperand().

static char getValType ( UndefValue  )  [static]

Definition at line 1260 of file Constants.cpp.

static char getValType ( ConstantPointerNull  )  [static]

Definition at line 1217 of file Constants.cpp.

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

Definition at line 1154 of file Constants.cpp.

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

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

Definition at line 1103 of file Constants.cpp.

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

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

Definition at line 998 of file Constants.cpp.

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

static char getValType ( ConstantAggregateZero CPZ  )  [static]

Definition at line 965 of file Constants.cpp.

static bool isSetCC ( unsigned  Opcode  )  [static]

Definition at line 321 of file Constants.cpp.


Variable Documentation

ValueMap<char, Type, ConstantAggregateZero> AggZeroConstants [static]

Definition at line 963 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantAggregateZero::destroyConstant(), and llvm::ConstantAggregateZero::get().

ArrayConstantsTy ArrayConstants [static]

Definition at line 1008 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantArray::destroyConstant(), llvm::ConstantArray::get(), and llvm::ConstantArray::replaceUsesOfWithOnConstant().

ValueMap<uint64_t, Type, ConstantFP> DoubleConstants [static]

Definition at line 918 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), and llvm::ConstantFP::get().

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

Definition at line 1358 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantExpr::destroyConstant(), llvm::ConstantExpr::getCast(), llvm::ConstantExpr::getExtractElementTy(), llvm::ConstantExpr::getGetElementPtrTy(), llvm::ConstantExpr::getInsertElementTy(), llvm::ConstantExpr::getSelectTy(), llvm::ConstantExpr::getShiftTy(), llvm::ConstantExpr::getShuffleVectorTy(), and llvm::ConstantExpr::getTy().

ValueMap<uint32_t, Type, ConstantFP> FloatConstants [static]

Definition at line 919 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), and llvm::ConstantFP::get().

ValueMap<char, PointerType, ConstantPointerNull> NullPtrConstants [static]

Definition at line 1215 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantPointerNull::destroyConstant(), and llvm::ConstantPointerNull::get().

Use Op

Definition at line 314 of file Constants.cpp.

Use Ops[2]

Definition at line 362 of file Constants.cpp.

Use Ops[3]

Definition at line 331 of file Constants.cpp.

Referenced by llvm::BranchInst::BranchInst(), BuildSplatI(), BuildVSLDOI(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInstruction(), GeneratePerfectShuffle(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectInst::getCondition(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectInst::getFalseValue(), llvm::BranchInst::getOperand(), llvm::ShuffleVectorInst::getOperand(), llvm::InsertElementInst::getOperand(), llvm::ExtractElementInst::getOperand(), llvm::SelectInst::getOperand(), llvm::ShiftInst::getOperand(), llvm::SelectInst::getTrueValue(), llvm::SelectionDAGLowering::getValue(), llvm::ConstantExpr::getWithOperandReplaced(), isCommutedMOVL(), isCommutedSHUFP(), llvm::X86::isMOVLMask(), llvm::X86::isSHUFPMask(), llvm::X86::isUNPCKHMask(), llvm::X86::isUNPCKLMask(), LowerCALL(), llvm::AlphaTargetLowering::LowerCallTo(), LowerINTRINSIC_WO_CHAIN(), LowerMUL(), llvm::MapValue(), MoveImmediateValues(), MoveLoopVariantsToImediateField(), OptimizeConstantExpr(), llvm::PPCTargetLowering::PerformDAGCombine(), RemapOperand(), SeparateSubExprs(), llvm::BranchInst::setOperand(), llvm::ShuffleVectorInst::setOperand(), llvm::InsertElementInst::setOperand(), llvm::ExtractElementInst::setOperand(), llvm::SelectInst::setOperand(), llvm::ShiftInst::setOperand(), and llvm::BranchInst::setUnconditionalDest().

ValueMap<std::vector<Constant*>, PackedType, ConstantPacked> PackedConstants [static]

Definition at line 1163 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantPacked::destroyConstant(), and llvm::ConstantPacked::get().

ValueMap< int64_t, Type, ConstantSInt> SIntConstants [static]

Definition at line 882 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), and llvm::ConstantSInt::get().

StructConstantsTy StructConstants [static]

Definition at line 1101 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::ConstantStruct::destroyConstant(), llvm::ConstantStruct::get(), and llvm::ConstantStruct::replaceUsesOfWithOnConstant().

ValueMap<uint64_t, Type, ConstantUInt> UIntConstants [static]

Definition at line 883 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), and llvm::ConstantUInt::get().

ValueMap<char, Type, UndefValue> UndefValueConstants [static]

Definition at line 1258 of file Constants.cpp.

Referenced by llvm::Constant::clearAllValueMaps(), llvm::UndefValue::destroyConstant(), and llvm::UndefValue::get().