LLVM API Documentation

Defines | Functions
InstCombineCalls.cpp File Reference
#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"
Include dependency graph for InstCombineCalls.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "instcombine"

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 DL, const int ix)
static IntrinsicInstFindInitTrampolineFromAlloca (Value *TrampMem)
static IntrinsicInstFindInitTrampolineFromBB (IntrinsicInst *AdjustTramp, Value *TrampMem)
static IntrinsicInstFindInitTrampoline (Value *Callee)

Define Documentation

#define DEBUG_TYPE   "instcombine"

Definition at line 25 of file InstCombineCalls.cpp.


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 31 of file InstCombineCalls.cpp.

References llvm::Type::getContext(), and llvm::Type::getInt32Ty().

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"   
)