LLVM
10.0.0svn
|
#include "llvm/CodeGen/IntrinsicLowering.h"
Public Member Functions | |
IntrinsicLowering (const DataLayout &DL) | |
void | LowerIntrinsicCall (CallInst *CI) |
Replace a call to the specified intrinsic function. More... | |
Static Public Member Functions | |
static bool | LowerToByteSwap (CallInst *CI) |
Try to replace a call instruction with a call to a bswap intrinsic. More... | |
Definition at line 25 of file IntrinsicLowering.h.
|
inlineexplicit |
Definition at line 31 of file IntrinsicLowering.h.
References LowerIntrinsicCall(), and LowerToByteSwap().
void IntrinsicLowering::LowerIntrinsicCall | ( | CallInst * | CI | ) |
Replace a call to the specified intrinsic function.
If an intrinsic function must be implemented by the code generator (such as va_start), this function should print a message and abort.
Otherwise, if an intrinsic function call can be lowered, the code to implement it (often a call to a non-intrinsic function) is inserted after the call instruction and the call is deleted. The caller must be capable of handling this kind of change.
Definition at line 234 of file IntrinsicLowering.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::arg_end(), assert(), Callee, Context, llvm::IRBuilder< T, Inserter >::CreateAnd(), llvm::IRBuilder< T, Inserter >::CreateIntCast(), llvm::IRBuilder< T, Inserter >::CreateNot(), llvm::IRBuilder< T, Inserter >::CreateSub(), llvm::Instruction::eraseFromParent(), llvm::errs(), llvm::ConstantInt::get(), llvm::ConstantPointerNull::get(), llvm::UndefValue::get(), llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::Value::getContext(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DataLayout::getIntPtrType(), llvm::Function::getIntrinsicID(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::getVoidTy(), llvm::Type::isVoidTy(), llvm::log2(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::Intrinsic::not_intrinsic, prefetch, llvm::Value::replaceAllUsesWith(), ReplaceCallWith(), ReplaceFPIntrinsicWithCall(), llvm::report_fatal_error(), round(), llvm::Value::setName(), Size, and llvm::Value::use_empty().
Referenced by IntrinsicLowering(), and llvm::Interpreter::visitCallSite().
Try to replace a call instruction with a call to a bswap intrinsic.
Return false if the call is not a simple integer bswap.
Definition at line 488 of file IntrinsicLowering.cpp.
References llvm::CallInst::Create(), llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::CallBase::getNumArgOperands(), llvm::Value::getType(), llvm::Type::isIntegerTy(), and llvm::Value::replaceAllUsesWith().
Referenced by llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), and IntrinsicLowering().