LLVM API Documentation
#include "InstCombine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "instcombine" |
Functions | |
STATISTIC (NumSimplified,"Number of library calls simplified") | |
static Type * | getPromotedType (Type *Ty) |
static Type * | reduceToSingleValueType (Type *T) |
static bool | isSafeToEliminateVarargsCast (const CallSite CS, const CastInst *const CI, const DataLayout *const DL, const int ix) |
static IntrinsicInst * | FindInitTrampolineFromAlloca (Value *TrampMem) |
static IntrinsicInst * | FindInitTrampolineFromBB (IntrinsicInst *AdjustTramp, Value *TrampMem) |
static IntrinsicInst * | FindInitTrampoline (Value *Callee) |
#define DEBUG_TYPE "instcombine" |
Definition at line 25 of file InstCombineCalls.cpp.
static IntrinsicInst* FindInitTrampoline | ( | Value * | Callee | ) | [static] |
Definition at line 1132 of file InstCombineCalls.cpp.
References llvm::dyn_cast(), FindInitTrampolineFromAlloca(), FindInitTrampolineFromBB(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), IT(), and llvm::Value::stripPointerCasts().
static IntrinsicInst* FindInitTrampolineFromAlloca | ( | Value * | TrampMem | ) | [static] |
Definition at line 1072 of file InstCombineCalls.cpp.
References llvm::dyn_cast(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), llvm::Value::hasOneUse(), llvm::Value::stripPointerCasts(), llvm::Value::user_back(), and llvm::Value::users().
Referenced by FindInitTrampoline().
static IntrinsicInst* FindInitTrampolineFromBB | ( | IntrinsicInst * | AdjustTramp, |
Value * | TrampMem | ||
) | [static] |
Definition at line 1111 of file InstCombineCalls.cpp.
References llvm::BasicBlock::begin(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), llvm::Instruction::getParent(), I, and llvm::Instruction::mayWriteToMemory().
Referenced by FindInitTrampoline().
static Type* getPromotedType | ( | Type * | Ty | ) | [static] |
getPromotedType - Return the specified type promoted as it would be to pass though a va_arg area.
Definition at line 31 of file InstCombineCalls.cpp.
References llvm::Type::getContext(), and llvm::Type::getInt32Ty().
static bool isSafeToEliminateVarargsCast | ( | const CallSite | CS, |
const CastInst *const | CI, | ||
const DataLayout *const | DL, | ||
const int | ix | ||
) | [static] |
isSafeToEliminateVarargsCast - If this cast does not affect the value passed through the varargs area, we can eliminate the use of the cast.
Definition at line 1034 of file InstCombineCalls.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValOrInAllocaArgument(), llvm::CastInst::isLosslessCast(), and llvm::Type::isSized().
static Type* reduceToSingleValueType | ( | Type * | T | ) | [static] |
reduceToSingleValueType - Given an aggregate type which ultimately holds a single scalar element, like {{{type}}} or [1 x type], return type.
Definition at line 41 of file InstCombineCalls.cpp.
References llvm::Type::isSingleValueType(), and T.
STATISTIC | ( | NumSimplified | , |
"Number of library calls simplified" | |||
) |