LLVM  mainline
Defines | Functions
InstCombineCalls.cpp File Reference
#include "InstCombineInternal.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/SimplifyLibCalls.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 ValueSimplifyX86insertps (const IntrinsicInst &II, InstCombiner::BuilderTy &Builder)
static ValueSimplifyX86vperm2 (const IntrinsicInst &II, InstCombiner::BuilderTy &Builder)
static bool isSafeToEliminateVarargsCast (const CallSite CS, const DataLayout &DL, const CastInst *const CI, 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 27 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 33 of file InstCombineCalls.cpp.

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

static bool isSafeToEliminateVarargsCast ( const CallSite  CS,
const DataLayout DL,
const CastInst *const  CI,
const int  ix 
) [static]
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 43 of file InstCombineCalls.cpp.

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

static Value* SimplifyX86insertps ( const IntrinsicInst II,
InstCombiner::BuilderTy Builder 
) [static]
static Value* SimplifyX86vperm2 ( const IntrinsicInst II,
InstCombiner::BuilderTy Builder 
) [static]

The shuffle mask for a perm2*128 selects any two halves of two 256-bit source vectors, unless a zero bit is set. If a zero bit is set, then ignore that half of the mask and clear that half of the vector.

Definition at line 259 of file InstCombineCalls.cpp.

References llvm::IRBuilder< preserveNames, T, Inserter >::CreateShuffleVector(), llvm::ConstantAggregateZero::get(), llvm::CallInst::getArgOperand(), llvm::VectorType::getNumElements(), and llvm::Value::getType().

Referenced by llvm::InstCombiner::visitCallInst().

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