LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ExprTypeConvert.cpp File Reference

#include "TransformInternals.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/Expressions.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include <algorithm>

Include dependency graph for ExprTypeConvert.cpp:

Go to the source code of this file.

Functions

static bool OperandConvertibleToType (User *U, Value *V, const Type *Ty, ValueTypeCache &ConvertedTypes, const TargetData &TD)
static void ConvertOperandToType (User *U, Value *OldVal, Value *NewVal, ValueMapCache &VMC, const TargetData &TD)
static bool MallocConvertibleToType (MallocInst *MI, const Type *Ty, ValueTypeCache &CTMap, const TargetData &TD)
static InstructionConvertMallocToType (MallocInst *MI, const Type *Ty, const std::string &Name, ValueMapCache &VMC, const TargetData &TD)
bool llvm::ExpressionConvertibleToType (Value *V, const Type *Ty, ValueTypeCache &CTMap, const TargetData &TD)
Valuellvm::ConvertExpressionToType (Value *V, const Type *Ty, ValueMapCache &VMC, const TargetData &TD)
bool llvm::ValueConvertibleToType (Value *V, const Type *Ty, ValueTypeCache &ConvertedTypes, const TargetData &TD)
void llvm::ConvertValueToNewType (Value *V, Value *NewVal, ValueMapCache &VMC, const TargetData &TD)
static void RecursiveDelete (ValueMapCache &Cache, Instruction *I)


Function Documentation

static Instruction* ConvertMallocToType MallocInst MI,
const Type Ty,
const std::string &  Name,
ValueMapCache VMC,
const TargetData TD
[static]
 

Definition at line 82 of file ExprTypeConvert.cpp.

References Add(), llvm::ClassifyExpr(), llvm::BinaryOperator::create(), llvm::BasicBlock::end(), llvm::ConstantUInt::get(), llvm::AllocationInst::getArraySize(), llvm::getConstantValue(), llvm::SequentialType::getElementType(), llvm::Value::getName(), llvm::Instruction::getParent(), llvm::Value::getType(), llvm::AllocationInst::getType(), llvm::TargetData::getTypeSize(), Mul(), llvm::ExprType::Offset, llvm::ExprType::Scale, llvm::Type::UIntTy, and llvm::ExprType::Var.

Referenced by llvm::ConvertExpressionToType().

static void ConvertOperandToType User U,
Value OldVal,
Value NewVal,
ValueMapCache VMC,
const TargetData TD
[static]
 

Definition at line 914 of file ExprTypeConvert.cpp.

References Add(), llvm::PHINode::addIncoming(), llvm::ISD::Call, llvm::Instruction::Cast, llvm::ConvertExpressionToType(), llvm::ConvertibleToGEP(), llvm::ConvertValueToNewType(), llvm::BinaryOperator::create(), DEBUG, llvm::BasicBlock::end(), llvm::ValueMapCache::ExprMap, llvm::ConstantUInt::get(), llvm::ConstantSInt::get(), llvm::PointerType::get(), llvm::SequentialType::getElementType(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::BasicBlock::getInstList(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::User::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::FunctionType::getParamType(), llvm::Instruction::getParent(), llvm::FunctionType::getReturnType(), llvm::getStructOffsetType(), llvm::Value::getType(), llvm::TargetData::getTypeSize(), I, llvm::GetElementPtrInst::idx_begin(), llvm::GetElementPtrInst::idx_end(), llvm::Type::isFirstClassType(), llvm::Type::isSigned(), llvm::ISD::Load, Mul(), llvm::ValueMapCache::NewCasts, llvm::ValueMapCache::OperandsMapped, llvm::ISD::PHI, llvm::PHINode::removeIncomingValue(), llvm::User::replaceUsesOfWith(), llvm::Type::SByteTy, llvm::ISD::SetEQ, llvm::Instruction::setName(), llvm::ISD::SetNE, llvm::User::setOperand(), llvm::Instruction::Shl, llvm::ISD::Store, llvm::Type::UIntTy, llvm::Value::use_begin(), llvm::Value::use_end(), V, and llvm::Type::VoidTy.

Referenced by llvm::ConvertExpressionToType(), and llvm::ConvertValueToNewType().

static bool MallocConvertibleToType MallocInst MI,
const Type Ty,
ValueTypeCache CTMap,
const TargetData TD
[static]
 

Definition at line 43 of file ExprTypeConvert.cpp.

References llvm::ClassifyExpr(), llvm::AllocationInst::getArraySize(), llvm::getConstantValue(), llvm::SequentialType::getElementType(), llvm::AllocationInst::getType(), llvm::TargetData::getTypeSize(), llvm::ExprType::Offset, llvm::ExprType::Scale, and llvm::ExprType::Var.

Referenced by llvm::ExpressionConvertibleToType().

static bool OperandConvertibleToType User U,
Value V,
const Type Ty,
ValueTypeCache ConvertedTypes,
const TargetData TD
[static]
 

Definition at line 590 of file ExprTypeConvert.cpp.

References Add(), llvm::ISD::Call, llvm::Instruction::Cast, llvm::ConvertibleToGEP(), llvm::BinaryOperator::create(), llvm::ExpressionConvertibleToType(), llvm::ConstantUInt::get(), llvm::ConstantSInt::get(), llvm::PointerType::get(), llvm::SequentialType::getElementType(), llvm::PHINode::getIncomingValue(), llvm::PHINode::getNumIncomingValues(), llvm::User::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::getStructOffsetType(), llvm::Value::getType(), llvm::TargetData::getTypeSize(), I, llvm::Type::isFirstClassType(), llvm::Type::isFloatingPoint(), llvm::Type::isIntegral(), llvm::Type::isLosslesslyConvertibleTo(), llvm::Type::isSigned(), llvm::FunctionType::isVarArg(), llvm::ISD::Load, Mul(), llvm::User::op_begin(), llvm::User::op_end(), llvm::ISD::PHI, llvm::ISD::SetEQ, llvm::ISD::SetNE, llvm::Instruction::Shl, llvm::ISD::Store, and llvm::ValueConvertibleToType().

Referenced by llvm::ExpressionConvertibleToType(), and llvm::ValueConvertibleToType().

static void RecursiveDelete ValueMapCache Cache,
Instruction I
[static]
 

Definition at line 1272 of file ExprTypeConvert.cpp.

References llvm::ValueMapCache::ExprMap, llvm::BasicBlock::getInstList(), llvm::Instruction::getParent(), llvm::User::op_begin(), llvm::User::op_end(), llvm::ValueMapCache::OperandsMapped, U, and llvm::Value::use_empty().

Referenced by llvm::ValueHandle::~ValueHandle().