LLVM API Documentation
#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>
Go to the source code of this file.
| 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.
| static Constant* getFoldedCast | ( | Instruction::CastOps | opc, | |
| Constant * | C, | |||
| const Type * | Ty | |||
| ) | [inline, static] |
This is a utility function to handle folding of casts and lookup of the cast in the ExprConstants map. It is used by the various get* methods below.
Definition at line 1794 of file Constants.cpp.
References llvm::ConstantFoldCastInstruction(), and llvm::Type::isFirstClassType().
Referenced by llvm::ConstantExpr::getBitCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::ConstantExpr::getIntToPtr(), llvm::ConstantExpr::getPtrToInt(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getUIToFP(), and llvm::ConstantExpr::getZExt().
| 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] |
Definition at line 279 of file Constants.cpp.
References llvm::Type::DoubleTy, llvm::Type::FloatTy, llvm::Type::FP128Ty, llvm::APFloat::IEEEdouble, llvm::APFloat::IEEEquad, llvm::APFloat::IEEEsingle, llvm::Type::PPC_FP128Ty, llvm::APFloat::PPCDoubleDouble, llvm::Type::X86_FP80Ty, and llvm::APFloat::x87DoubleExtended.
Referenced by llvm::ConstantFP::ConstantFP(), and llvm::ConstantFP::get().
ManagedStatic<ValueMap<char, Type, ConstantAggregateZero> > AggZeroConstants [static] |
Definition at line 1267 of file Constants.cpp.
ManagedStatic<ArrayConstantsTy> ArrayConstants [static] |
Definition at line 1312 of file Constants.cpp.
ManagedStatic<ValueMap<ExprMapKeyType, Type, ConstantExpr> > ExprConstants [static] |
Definition at line 1790 of file Constants.cpp.
ManagedStatic<FPMapTy> FPConstants [static] |
Definition at line 347 of file Constants.cpp.
| IndexList indices |
Definition at line 1657 of file Constants.cpp.
| const SmallVector<unsigned, 4> Indices |
Indices - These identify which value to extract.
Indices - These identify the position for the insertion.
Definition at line 586 of file Constants.cpp.
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getIndices(), llvm::InsertValueInst::getNumIndices(), llvm::InsertValueInst::idx_begin(), llvm::InsertValueInst::idx_end(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), llvm::MachOWriter::InitMem(), OptimizeGlobalAddressOfMalloc(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), and WriteConstantInt().
ManagedStatic<IntMapTy> IntConstants [static] |
Definition at line 250 of file Constants.cpp.
ManagedStatic<ValueMap<char, PointerType, ConstantPointerNull> > NullPtrConstants [static] |
Definition at line 1579 of file Constants.cpp.
| uint16_t opcode |
Definition at line 1654 of file Constants.cpp.
Definition at line 1656 of file Constants.cpp.
| uint16_t predicate |
Definition at line 644 of file Constants.cpp.
ManagedStatic<StructConstantsTy> StructConstants [static] |
Definition at line 1427 of file Constants.cpp.
ManagedCleanup<llvm::CleanupTrueFalse> TrueFalseCleanup [static] |
Definition at line 206 of file Constants.cpp.
Definition at line 224 of file Constants.cpp.
ManagedStatic<ValueMap<char, Type, UndefValue> > UndefValueConstants [static] |
Definition at line 1622 of file Constants.cpp.
Definition at line 223 of file Constants.cpp.
Referenced by llvm::MachOWriter::InitMem(), isFPS16Immediate(), llvm::SPU::LowerSplat_v2i64(), and llvm::PBQPMatrix::reset().
ManagedStatic<ValueMap<std::vector<Constant*>, VectorType, ConstantVector> > VectorConstants [static] |
Definition at line 1489 of file Constants.cpp.