LLVM 18.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::IntrinsicLowering Class Reference

#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.

Detailed Description

Definition at line 22 of file IntrinsicLowering.h.

Constructor & Destructor Documentation

◆ IntrinsicLowering()

llvm::IntrinsicLowering::IntrinsicLowering ( const DataLayout DL)

Definition at line 28 of file IntrinsicLowering.h.

References DL.

Member Function Documentation

◆ LowerIntrinsicCall()

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(), Context, llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateIntCast(), llvm::IRBuilderBase::CreateNot(), llvm::IRBuilderBase::CreateSub(), llvm::Instruction::eraseFromParent(), llvm::errs(), llvm::ConstantPointerNull::get(), llvm::UndefValue::get(), llvm::ConstantInt::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::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().

◆ LowerToByteSwap()

bool IntrinsicLowering::LowerToByteSwap ( CallInst CI)

The documentation for this class was generated from the following files: