LLVM 20.0.0git
|
#include "llvm/CodeGen/IntrinsicLowering.h"
Public Member Functions | |
IntrinsicLowering (const DataLayout &DL) | |
void | LowerIntrinsicCall (CallInst *CI) |
Replace a call to the specified intrinsic function. | |
Static Public Member Functions | |
static bool | LowerToByteSwap (CallInst *CI) |
Try to replace a call instruction with a call to a bswap intrinsic. | |
Definition at line 22 of file IntrinsicLowering.h.
|
inlineexplicit |
Definition at line 28 of file IntrinsicLowering.h.
References DL.
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 224 of file IntrinsicLowering.cpp.
References assert(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateIntCast(), llvm::IRBuilderBase::CreateNot(), llvm::IRBuilderBase::CreateSub(), llvm::Instruction::eraseFromParent(), llvm::errs(), llvm::ConstantPointerNull::get(), llvm::PoisonValue::get(), llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::Value::getContext(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DataLayout::getIntPtrType(), llvm::Constant::getNullValue(), llvm::User::getOperand(), llvm::ConstantInt::getTrue(), llvm::Value::getType(), llvm::Type::isVoidTy(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::Intrinsic::not_intrinsic, llvm::Value::replaceAllUsesWith(), ReplaceCallWith(), ReplaceFPIntrinsicWithCall(), llvm::report_fatal_error(), llvm::Value::setName(), Size, and llvm::Value::use_empty().
Referenced by lowerIntrinsicToFunction(), and llvm::Interpreter::visitIntrinsicInst().
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 465 of file IntrinsicLowering.cpp.
References llvm::CallBase::arg_size(), llvm::CallInst::Create(), llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::Value::getType(), Int, llvm::Type::isIntegerTy(), and llvm::Value::replaceAllUsesWith().
Referenced by llvm::ARMTargetLowering::ExpandInlineAsm(), and llvm::X86TargetLowering::ExpandInlineAsm().