LLVM  8.0.1
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 AddPrototypes (Module &M)
 Add all of the prototypes that might be needed by an intrinsic lowering implementation to be inserted into the module specified. More...
 
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 26 of file IntrinsicLowering.h.

Constructor & Destructor Documentation

◆ IntrinsicLowering()

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

Definition at line 32 of file IntrinsicLowering.h.

References AddPrototypes(), LowerIntrinsicCall(), and LowerToByteSwap().

Member Function Documentation

◆ AddPrototypes()

void IntrinsicLowering::AddPrototypes ( Module M)

◆ 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 337 of file IntrinsicLowering.cpp.

References llvm::Intrinsic::addressofreturnaddress, llvm::Intrinsic::annotation, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), assert(), llvm::Intrinsic::assume, llvm::Intrinsic::bswap, Callee, llvm::Intrinsic::ceil, Context, llvm::Intrinsic::copysign, llvm::Intrinsic::cos, llvm::IRBuilder< T, Inserter >::CreateAnd(), llvm::IRBuilder< T, Inserter >::CreateIntCast(), llvm::IRBuilder< T, Inserter >::CreateNot(), llvm::IRBuilder< T, Inserter >::CreateSub(), llvm::Intrinsic::ctlz, llvm::Intrinsic::ctpop, llvm::Intrinsic::cttz, llvm::Intrinsic::dbg_declare, llvm::Intrinsic::dbg_label, llvm::Intrinsic::eh_typeid_for, llvm::Instruction::eraseFromParent(), llvm::errs(), llvm::Intrinsic::exp, llvm::Intrinsic::exp2, llvm::Intrinsic::expect, llvm::Intrinsic::floor, llvm::Intrinsic::flt_rounds, llvm::Intrinsic::frameaddress, llvm::ConstantInt::get(), llvm::ConstantPointerNull::get(), llvm::UndefValue::get(), llvm::Intrinsic::get_dynamic_area_offset, 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::Intrinsic::invariant_end, llvm::Intrinsic::invariant_start, llvm::Type::isVoidTy(), llvm::Intrinsic::lifetime_end, llvm::Intrinsic::lifetime_start, llvm::Intrinsic::log, llvm::Intrinsic::log10, llvm::Intrinsic::log2, llvm::Intrinsic::longjmp, LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::Intrinsic::memcpy, llvm::Intrinsic::memmove, llvm::Intrinsic::memset, llvm::Intrinsic::not_intrinsic, llvm::Intrinsic::pcmarker, llvm::Intrinsic::pow, llvm::Intrinsic::prefetch, llvm::Intrinsic::ptr_annotation, llvm::Intrinsic::readcyclecounter, llvm::Value::replaceAllUsesWith(), ReplaceCallWith(), ReplaceFPIntrinsicWithCall(), llvm::report_fatal_error(), llvm::Intrinsic::returnaddress, llvm::Intrinsic::round, llvm::Intrinsic::setjmp, llvm::Value::setName(), llvm::Intrinsic::siglongjmp, llvm::Intrinsic::sigsetjmp, llvm::Intrinsic::sin, Size, llvm::Intrinsic::sqrt, llvm::Intrinsic::stackrestore, llvm::Intrinsic::stacksave, llvm::Intrinsic::trunc, llvm::Value::use_empty(), and llvm::Intrinsic::var_annotation.

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: