LLVM  10.0.0svn
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. More...
 

Static Public Member Functions

static bool LowerToByteSwap (CallInst *CI)
 Try to replace a call instruction with a call to a bswap intrinsic. More...
 

Detailed Description

Definition at line 25 of file IntrinsicLowering.h.

Constructor & Destructor Documentation

◆ IntrinsicLowering()

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

Definition at line 31 of file IntrinsicLowering.h.

References LowerIntrinsicCall(), and LowerToByteSwap().

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 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().

◆ LowerToByteSwap()

bool IntrinsicLowering::LowerToByteSwap ( CallInst CI)
static

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