LLVM: lib/CodeGen/IntrinsicLowering.cpp File Reference (original) (raw)
Go to the source code of this file.
| Functions | |
|---|---|
| template | |
| static CallInst * | ReplaceCallWith (const char *NewFn, CallInst *CI, ArgIt ArgBegin, ArgIt ArgEnd, Type *RetTy) |
| This function is used when we want to lower an intrinsic call to a call of an external function. | |
| static Value * | LowerBSWAP (LLVMContext &Context, Value *V, Instruction *IP) |
| Emit the code to lower bswap of V before the specified instruction IP. | |
| static Value * | LowerCTPOP (LLVMContext &Context, Value *V, Instruction *IP) |
| Emit the code to lower ctpop of V before the specified instruction IP. | |
| static Value * | LowerCTLZ (LLVMContext &Context, Value *V, Instruction *IP) |
| Emit the code to lower ctlz of V before the specified instruction IP. | |
| static void | ReplaceFPIntrinsicWithCall (CallInst *CI, const char *Fname, const char *Dname, const char *LDname) |
◆ LowerBSWAP()
◆ LowerCTLZ()
◆ LowerCTPOP()
◆ 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, but that prototype doesn't match the arguments we expect to pass in.
Definition at line 30 of file IntrinsicLowering.cpp.
References llvm::FunctionType::get(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), I, llvm::Value::replaceAllUsesWith(), llvm::Value::setName(), and llvm::Value::use_empty().
Referenced by llvm::IntrinsicLowering::LowerIntrinsicCall(), and ReplaceFPIntrinsicWithCall().
◆ ReplaceFPIntrinsicWithCall()
Definition at line 202 of file IntrinsicLowering.cpp.
References llvm::CallBase::arg_begin(), llvm::CallBase::arg_end(), llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm_unreachable, llvm::Type::PPC_FP128TyID, ReplaceCallWith(), and llvm::Type::X86_FP80TyID.
Referenced by llvm::IntrinsicLowering::LowerIntrinsicCall().