LLVM API Documentation
#include "Interpreter.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cmath>
Go to the source code of this file.
#define DEBUG_TYPE "interpreter" |
Definition at line 30 of file Execution.cpp.
#define FLOAT_VECTOR_FUNCTION | ( | OP, | |
TY | |||
) |
for (unsigned i = 0; i < R.AggregateVal.size(); ++i) \ R.AggregateVal[i].TY = \ Src1.AggregateVal[i].TY OP Src2.AggregateVal[i].TY;
#define FLOAT_VECTOR_OP | ( | OP | ) |
{ \ if (dyn_cast<VectorType>(Ty)->getElementType()->isFloatTy()) \ FLOAT_VECTOR_FUNCTION(OP, FloatVal) \ else { \ if (dyn_cast<VectorType>(Ty)->getElementType()->isDoubleTy()) \ FLOAT_VECTOR_FUNCTION(OP, DoubleVal) \ else { \ dbgs() << "Unhandled type for OP instruction: " << *Ty << "\n"; \ llvm_unreachable(0); \ } \ } \ }
Referenced by llvm::Interpreter::visitBinaryOperator().
#define IMPLEMENT_BINARY_OPERATOR | ( | OP, | |
TY | |||
) |
case Type::TY##TyID: \ Dest.TY##Val = Src1.TY##Val OP Src2.TY##Val; \ break
Definition at line 49 of file Execution.cpp.
Referenced by executeFAddInst(), executeFDivInst(), executeFMulInst(), and executeFSubInst().
#define IMPLEMENT_FCMP | ( | OP, | |
TY | |||
) |
Definition at line 303 of file Execution.cpp.
Referenced by executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), and executeFCMP_ONE().
#define IMPLEMENT_INTEGER_ICMP | ( | OP, | |
TY | |||
) |
case Type::IntegerTyID: \ Dest.IntVal = APInt(1,Src1.IntVal.OP(Src2.IntVal)); \ break;
Definition at line 113 of file Execution.cpp.
Referenced by executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), and executeICMP_ULT().
#define IMPLEMENT_POINTER_ICMP | ( | OP | ) |
case Type::PointerTyID: \ Dest.IntVal = APInt(1,(void*)(intptr_t)Src1.PointerVal OP \ (void*)(intptr_t)Src2.PointerVal); \ break;
Definition at line 131 of file Execution.cpp.
Referenced by executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), and executeICMP_ULT().
#define IMPLEMENT_SCALAR_NANS | ( | TY, | |
X, | |||
Y | |||
) |
if (TY->isFloatTy()) { \ if (X.FloatVal != X.FloatVal || Y.FloatVal != Y.FloatVal) { \ Dest.IntVal = APInt(1,false); \ return Dest; \ } \ } else { \ if (X.DoubleVal != X.DoubleVal || Y.DoubleVal != Y.DoubleVal) { \ Dest.IntVal = APInt(1,false); \ return Dest; \ } \ }
Definition at line 338 of file Execution.cpp.
Referenced by executeFCMP_ONE().
#define IMPLEMENT_UNORDERED | ( | TY, | |
X, | |||
Y | |||
) |
if (TY->isFloatTy()) { \ if (X.FloatVal != X.FloatVal || Y.FloatVal != Y.FloatVal) { \ Dest.IntVal = APInt(1,true); \ return Dest; \ } \ } else if (X.DoubleVal != X.DoubleVal || Y.DoubleVal != Y.DoubleVal) { \ Dest.IntVal = APInt(1,true); \ return Dest; \ }
Definition at line 456 of file Execution.cpp.
Referenced by executeFCMP_UEQ(), executeFCMP_UGE(), executeFCMP_UGT(), executeFCMP_ULE(), executeFCMP_ULT(), and executeFCMP_UNE().
#define IMPLEMENT_VAARG | ( | TY | ) | case Type::TY##TyID: Dest.TY##Val = Src.TY##Val; break |
Definition at line 1714 of file Execution.cpp.
Referenced by llvm::Interpreter::visitVAArgInst().
#define IMPLEMENT_VECTOR_FCMP | ( | OP | ) |
case Type::VectorTyID: \ if(dyn_cast<VectorType>(Ty)->getElementType()->isFloatTy()) { \ IMPLEMENT_VECTOR_FCMP_T(OP, Float); \ } else { \ IMPLEMENT_VECTOR_FCMP_T(OP, Double); \ }
Definition at line 316 of file Execution.cpp.
Referenced by executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), and executeFCMP_ONE().
#define IMPLEMENT_VECTOR_FCMP_T | ( | OP, | |
TY | |||
) |
assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \ Dest.AggregateVal.resize( Src1.AggregateVal.size() ); \ for( uint32_t _i=0;_i<Src1.AggregateVal.size();_i++) \ Dest.AggregateVal[_i].IntVal = APInt(1, \ Src1.AggregateVal[_i].TY##Val OP Src2.AggregateVal[_i].TY##Val);\ break;
Definition at line 308 of file Execution.cpp.
#define IMPLEMENT_VECTOR_INTEGER_ICMP | ( | OP, | |
TY | |||
) |
case Type::VectorTyID: { \ assert(Src1.AggregateVal.size() == Src2.AggregateVal.size()); \ Dest.AggregateVal.resize( Src1.AggregateVal.size() ); \ for( uint32_t _i=0;_i<Src1.AggregateVal.size();_i++) \ Dest.AggregateVal[_i].IntVal = APInt(1, \ Src1.AggregateVal[_i].IntVal.OP(Src2.AggregateVal[_i].IntVal));\ } break;
Definition at line 118 of file Execution.cpp.
Referenced by executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), and executeICMP_ULT().
#define IMPLEMENT_VECTOR_UNORDERED | ( | TY, | |
X, | |||
Y, | |||
_FUNC | |||
) |
if (TY->isVectorTy()) { \ GenericValue DestMask = Dest; \ Dest = _FUNC(Src1, Src2, Ty); \ for( size_t _i=0; _i<Src1.AggregateVal.size(); _i++) \ if (DestMask.AggregateVal[_i].IntVal == true) \ Dest.AggregateVal[_i].IntVal = APInt(1,true); \ return Dest; \ }
Definition at line 467 of file Execution.cpp.
Referenced by executeFCMP_UEQ(), executeFCMP_UGE(), executeFCMP_UGT(), executeFCMP_ULE(), executeFCMP_ULT(), and executeFCMP_UNE().
#define INTEGER_VECTOR_FUNCTION | ( | OP | ) |
for (unsigned i = 0; i < R.AggregateVal.size(); ++i) \ R.AggregateVal[i].IntVal = \ Src1.AggregateVal[i].IntVal.OP(Src2.AggregateVal[i].IntVal);
Referenced by llvm::Interpreter::visitBinaryOperator().
#define INTEGER_VECTOR_OPERATION | ( | OP | ) |
for (unsigned i = 0; i < R.AggregateVal.size(); ++i) \ R.AggregateVal[i].IntVal = \ Src1.AggregateVal[i].IntVal OP Src2.AggregateVal[i].IntVal;
Referenced by llvm::Interpreter::visitBinaryOperator().
#define MASK_VECTOR_NANS | ( | TY, | |
X, | |||
Y, | |||
FLAG | |||
) |
if (TY->isVectorTy()) { \ if (dyn_cast<VectorType>(TY)->getElementType()->isFloatTy()) { \ MASK_VECTOR_NANS_T(X, Y, Float, FLAG) \ } else { \ MASK_VECTOR_NANS_T(X, Y, Double, FLAG) \ } \ } \
Definition at line 363 of file Execution.cpp.
Referenced by executeFCMP_ONE(), executeFCMP_UEQ(), executeFCMP_UGE(), executeFCMP_UGT(), executeFCMP_ULE(), executeFCMP_ULT(), and executeFCMP_UNE().
#define MASK_VECTOR_NANS_T | ( | X, | |
Y, | |||
TZ, | |||
FLAG | |||
) |
assert(X.AggregateVal.size() == Y.AggregateVal.size()); \ Dest.AggregateVal.resize( X.AggregateVal.size() ); \ for( uint32_t _i=0;_i<X.AggregateVal.size();_i++) { \ if (X.AggregateVal[_i].TZ##Val != X.AggregateVal[_i].TZ##Val || \ Y.AggregateVal[_i].TZ##Val != Y.AggregateVal[_i].TZ##Val) \ Dest.AggregateVal[_i].IntVal = APInt(1,FLAG); \ else { \ Dest.AggregateVal[_i].IntVal = APInt(1,!FLAG); \ } \ }
Definition at line 351 of file Execution.cpp.
static GenericValue executeCmpInst | ( | unsigned | predicate, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 644 of file Execution.cpp.
References llvm::dbgs(), executeFCMP_BOOL(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UEQ(), executeFCMP_UGE(), executeFCMP_UGT(), executeFCMP_ULE(), executeFCMP_ULT(), executeFCMP_UNE(), executeFCMP_UNO(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, and llvm_unreachable.
static void executeFAddInst | ( | GenericValue & | Dest, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 54 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_BINARY_OPERATOR, and llvm_unreachable.
Referenced by llvm::Interpreter::visitBinaryOperator().
static GenericValue executeFCMP_BOOL | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
const Type * | Ty, | ||
const bool | val | ||
) | [static] |
Definition at line 594 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::GenericValue::IntVal, and llvm::Type::isVectorTy().
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_OEQ | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 324 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_VECTOR_FCMP, and llvm_unreachable.
Referenced by executeCmpInst(), executeFCMP_UEQ(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_OGE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 414 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_VECTOR_FCMP, and llvm_unreachable.
Referenced by executeCmpInst(), executeFCMP_UGE(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_OGT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 442 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_VECTOR_FCMP, and llvm_unreachable.
Referenced by executeCmpInst(), executeFCMP_UGT(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_OLE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 400 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_VECTOR_FCMP, and llvm_unreachable.
Referenced by executeCmpInst(), executeFCMP_ULE(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_OLT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 428 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_VECTOR_FCMP, and llvm_unreachable.
Referenced by executeCmpInst(), executeFCMP_ULT(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_ONE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 374 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_FCMP, IMPLEMENT_SCALAR_NANS, IMPLEMENT_VECTOR_FCMP, llvm::Type::isVectorTy(), llvm_unreachable, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), executeFCMP_UNE(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_ORD | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 532 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::GenericValue::DoubleVal, llvm::GenericValue::FloatVal, llvm::GenericValue::IntVal, llvm::Type::isFloatTy(), and llvm::Type::isVectorTy().
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_UEQ | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 477 of file Execution.cpp.
References executeFCMP_OEQ(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_UGE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 505 of file Execution.cpp.
References executeFCMP_OGE(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_UGT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 523 of file Execution.cpp.
References executeFCMP_OGT(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_ULE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 496 of file Execution.cpp.
References executeFCMP_OLE(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_ULT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 514 of file Execution.cpp.
References executeFCMP_OLT(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_UNE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 487 of file Execution.cpp.
References executeFCMP_ONE(), IMPLEMENT_UNORDERED, IMPLEMENT_VECTOR_UNORDERED, and MASK_VECTOR_NANS.
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static GenericValue executeFCMP_UNO | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 563 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::GenericValue::DoubleVal, llvm::GenericValue::FloatVal, llvm::GenericValue::IntVal, llvm::Type::isFloatTy(), and llvm::Type::isVectorTy().
Referenced by executeCmpInst(), and llvm::Interpreter::visitFCmpInst().
static void executeFDivInst | ( | GenericValue & | Dest, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 87 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_BINARY_OPERATOR, and llvm_unreachable.
Referenced by llvm::Interpreter::visitBinaryOperator().
static void executeFMulInst | ( | GenericValue & | Dest, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 76 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_BINARY_OPERATOR, and llvm_unreachable.
Referenced by llvm::Interpreter::visitBinaryOperator().
static void executeFRemInst | ( | GenericValue & | Dest, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 98 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::LibFunc::fmod, llvm::Type::getTypeID(), and llvm_unreachable.
Referenced by llvm::Interpreter::visitBinaryOperator().
static void executeFSubInst | ( | GenericValue & | Dest, |
GenericValue | Src1, | ||
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 65 of file Execution.cpp.
References llvm::dbgs(), llvm::NVPTX::PTXLdStInstCode::Float, llvm::Type::getTypeID(), IMPLEMENT_BINARY_OPERATOR, and llvm_unreachable.
Referenced by llvm::Interpreter::visitBinaryOperator().
static GenericValue executeICMP_EQ | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 137 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), llvm::Interpreter::visitICmpInst(), and llvm::Interpreter::visitSwitchInst().
static GenericValue executeICMP_NE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 151 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_SGE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 263 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_SGT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 207 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_SLE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 235 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_SLT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 179 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_UGE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 249 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_UGT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 193 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_ULE | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 221 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeICMP_ULT | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
Type * | Ty | ||
) | [static] |
Definition at line 165 of file Execution.cpp.
References llvm::dbgs(), llvm::Type::getTypeID(), IMPLEMENT_INTEGER_ICMP, IMPLEMENT_POINTER_ICMP, IMPLEMENT_VECTOR_INTEGER_ICMP, and llvm_unreachable.
Referenced by executeCmpInst(), and llvm::Interpreter::visitICmpInst().
static GenericValue executeSelectInst | ( | GenericValue | Src1, |
GenericValue | Src2, | ||
GenericValue | Src3, | ||
const Type * | Ty | ||
) | [static] |
Definition at line 789 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::GenericValue::IntVal, and llvm::Type::isVectorTy().
Referenced by llvm::Interpreter::visitSelectInst().
static unsigned getShiftAmount | ( | uint64_t | orgShiftAmount, |
llvm::APInt | valueToShift | ||
) | [static] |
Definition at line 1125 of file Execution.cpp.
References llvm::APInt::getBitWidth(), and llvm::NextPowerOf2().
Referenced by llvm::Interpreter::visitAShr(), llvm::Interpreter::visitLShr(), and llvm::Interpreter::visitShl().
static void SetValue | ( | Value * | V, |
GenericValue | Val, | ||
ExecutionContext & | SF | ||
) | [static] |
Definition at line 41 of file Execution.cpp.
References llvm::ExecutionContext::Values.
Referenced by llvm::Interpreter::callFunction(), llvm::Interpreter::visitAllocaInst(), llvm::Interpreter::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::Interpreter::visitBitCastInst(), llvm::Interpreter::visitCallSite(), llvm::Interpreter::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitFCmpInst(), llvm::Interpreter::visitFPExtInst(), llvm::Interpreter::visitFPToSIInst(), llvm::Interpreter::visitFPToUIInst(), llvm::Interpreter::visitFPTruncInst(), llvm::Interpreter::visitGetElementPtrInst(), llvm::Interpreter::visitICmpInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::Interpreter::visitIntToPtrInst(), llvm::Interpreter::visitLoadInst(), llvm::Interpreter::visitLShr(), llvm::Interpreter::visitPtrToIntInst(), llvm::Interpreter::visitSelectInst(), llvm::Interpreter::visitSExtInst(), llvm::Interpreter::visitShl(), llvm::Interpreter::visitShuffleVectorInst(), llvm::Interpreter::visitSIToFPInst(), llvm::Interpreter::visitTruncInst(), llvm::Interpreter::visitUIToFPInst(), llvm::Interpreter::visitVAArgInst(), and llvm::Interpreter::visitZExtInst().
STATISTIC | ( | NumDynamicInsts | , |
"Number of dynamic instructions executed" | |||
) |
cl::opt<bool> PrintVolatile("interpreter-print-volatile", cl::Hidden, cl::desc("make the interpreter print every volatile load and store")) [static] |
Referenced by llvm::Interpreter::visitLoadInst(), and llvm::Interpreter::visitStoreInst().