|
LLVM
3.7.0
|
#include "InstCombineInternal.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/InstructionSimplify.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"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "instcombine" |
Functions | |
| STATISTIC (NumSimplified,"Number of library calls simplified") | |
| static Type * | getPromotedType (Type *Ty) |
| getPromotedType - Return the specified type promoted as it would be to pass though a va_arg area. More... | |
| static Type * | reduceToSingleValueType (Type *T) |
| reduceToSingleValueType - Given an aggregate type which ultimately holds a single scalar element, like {{{type}}} or [1 x type], return type. More... | |
| static Value * | SimplifyX86insertps (const IntrinsicInst &II, InstCombiner::BuilderTy &Builder) |
| static Value * | SimplifyX86vperm2 (const IntrinsicInst &II, InstCombiner::BuilderTy &Builder) |
| The shuffle mask for a perm2*128 selects any two halves of two 256-bit source vectors, unless a zero bit is set. More... | |
| static bool | isSafeToEliminateVarargsCast (const CallSite CS, const DataLayout &DL, const CastInst *const CI, const int ix) |
| isSafeToEliminateVarargsCast - If this cast does not affect the value passed through the varargs area, we can eliminate the use of the cast. More... | |
| static IntrinsicInst * | FindInitTrampolineFromAlloca (Value *TrampMem) |
| static IntrinsicInst * | FindInitTrampolineFromBB (IntrinsicInst *AdjustTramp, Value *TrampMem) |
| static IntrinsicInst * | FindInitTrampoline (Value *Callee) |
| #define DEBUG_TYPE "instcombine" |
Definition at line 28 of file InstCombineCalls.cpp.
|
static |
Definition at line 1375 of file InstCombineCalls.cpp.
References llvm::dyn_cast(), FindInitTrampolineFromAlloca(), FindInitTrampolineFromBB(), llvm::IntrinsicInst::getIntrinsicID(), llvm::User::getOperand(), IT(), and llvm::Value::stripPointerCasts().
|
static |
Definition at line 1315 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 |
Definition at line 1354 of file InstCombineCalls.cpp.
References llvm::BasicBlock::begin(), llvm::Instruction::getParent(), I, and llvm::Instruction::mayWriteToMemory().
Referenced by FindInitTrampoline().
getPromotedType - Return the specified type promoted as it would be to pass though a va_arg area.
Definition at line 34 of file InstCombineCalls.cpp.
References llvm::Type::getContext(), and llvm::Type::getInt32Ty().
|
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 1265 of file InstCombineCalls.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValOrInAllocaArgument(), llvm::isGCRelocate(), llvm::isGCResult(), llvm::CastInst::isLosslessCast(), llvm::Type::isSized(), and llvm::isStatepoint().
reduceToSingleValueType - Given an aggregate type which ultimately holds a single scalar element, like {{{type}}} or [1 x type], return type.
Definition at line 44 of file InstCombineCalls.cpp.
References llvm::Type::isSingleValueType(), and T.
|
static |
Definition at line 201 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().
|
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 260 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" | |||
| ) |
1.8.6