LLVM API Documentation

llvm::IntrinsicLowering Class Reference

#include <IntrinsicLowering.h>

Collaboration diagram for llvm::IntrinsicLowering:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 IntrinsicLowering (const TargetData &td)
void AddPrototypes (Module &M)
void LowerIntrinsicCall (CallInst *CI)


Detailed Description

Definition at line 26 of file IntrinsicLowering.h.


Constructor & Destructor Documentation

llvm::IntrinsicLowering::IntrinsicLowering ( const TargetData td  )  [inline, explicit]

Definition at line 29 of file IntrinsicLowering.h.


Member Function Documentation

void IntrinsicLowering::AddPrototypes ( Module M  ) 

AddPrototypes - This method, if called, causes all of the prototypes that might be needed by an intrinsic lowering implementation to be inserted into the module specified.

Definition at line 84 of file IntrinsicLowering.cpp.

References llvm::Module::begin(), E, llvm::Module::end(), EnsureFPIntrinsicsExist(), EnsureFunctionExists(), llvm::TargetData::getIntPtrType(), llvm::Module::getOrInsertFunction(), llvm::PointerType::getUnqual(), I, llvm::Type::Int32Ty, llvm::Type::Int8Ty, and llvm::Type::VoidTy.

void IntrinsicLowering::LowerIntrinsicCall ( CallInst CI  ) 

LowerIntrinsicCall - This method replaces a call with the LLVM function which should be used to implement the specified intrinsic function call. 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 652 of file IntrinsicLowering.cpp.

References llvm::cerr(), llvm::BinaryOperator::CreateNot(), llvm::Instruction::eraseFromParent(), llvm::ConstantPointerNull::get(), llvm::ConstantInt::get(), llvm::CallInst::getCalledFunction(), llvm::TargetData::getIntPtrType(), llvm::Function::getIntrinsicID(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::User::getOperand(), llvm::Type::getPrimitiveSizeInBits(), llvm::Value::getType(), llvm::Type::Int32Ty, llvm::Type::Int64Ty, LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), LowerPartSelect(), LowerPartSet(), llvm::Intrinsic::not_intrinsic, llvm::User::op_begin(), llvm::User::op_end(), llvm::Value::replaceAllUsesWith(), ReplaceCallWith(), ReplaceFPIntrinsicWithCall(), Src, llvm::Value::use_empty(), V, and llvm::Type::VoidTy.

Referenced by llvm::Interpreter::visitCallSite().


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.