LLVM API Documentation
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include <iostream>
Include dependency graph for IntrinsicLowering.cpp:
Go to the source code of this file.
Functions | |
template<class ArgIt> | |
static Function * | EnsureFunctionExists (Module &M, const char *Name, ArgIt ArgBegin, ArgIt ArgEnd, const Type *RetTy) |
template<class ArgIt> | |
static CallInst * | ReplaceCallWith (const char *NewFn, CallInst *CI, ArgIt ArgBegin, ArgIt ArgEnd, const Type *RetTy, Function *&FCache) |
|
Definition at line 24 of file IntrinsicLowering.cpp. References F, llvm::FunctionType::get(), llvm::Module::getNamedFunction(), llvm::Module::getOrInsertFunction(), and I. Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(). |
|
ReplaceCallWith - This function is used when we want to lower an intrinsic call to a call of an external function. This handles hard cases such as when there was already a prototype for the external function, and if that prototype doesn't match the arguments we expect to pass in. Definition at line 40 of file IntrinsicLowering.cpp. References llvm::FunctionType::get(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::Module::getNamedFunction(), llvm::Constant::getNullValue(), llvm::FunctionType::getNumParams(), llvm::Module::getOrInsertFunction(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::FunctionType::getReturnType(), llvm::Value::getType(), I, M, llvm::Value::replaceAllUsesWith(), llvm::Instruction::setName(), llvm::Value::use_empty(), V, and llvm::Type::VoidTy. Referenced by llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(). |