LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
InstCombineCalls.cpp File Reference
#include "InstCombine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/PatternMatch.h"
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/Transforms/Utils/Local.h"
Include dependency graph for InstCombineCalls.cpp:

Go to the source code of this file.

Functions

 STATISTIC (NumSimplified,"Number of library calls simplified")
 
static TypegetPromotedType (Type *Ty)
 
static TypereduceToSingleValueType (Type *T)
 
static bool isSafeToEliminateVarargsCast (const CallSite CS, const CastInst *const CI, const DataLayout *const TD, const int ix)
 
static IntrinsicInstFindInitTrampolineFromAlloca (Value *TrampMem)
 
static IntrinsicInstFindInitTrampolineFromBB (IntrinsicInst *AdjustTramp, Value *TrampMem)
 
static IntrinsicInstFindInitTrampoline (Value *Callee)
 

Function Documentation

static IntrinsicInst* FindInitTrampoline ( Value Callee)
static
static IntrinsicInst* FindInitTrampolineFromAlloca ( Value TrampMem)
static
static IntrinsicInst* FindInitTrampolineFromBB ( IntrinsicInst AdjustTramp,
Value TrampMem 
)
static
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 29 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  TD,
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 763 of file InstCombineCalls.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValArgument(), 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 39 of file InstCombineCalls.cpp.

References llvm::Type::isSingleValueType(), and T.

STATISTIC ( NumSimplified  ,
"Number of library calls simplified"   
)