clang  6.0.0svn
Public Member Functions | List of all members
clang::CodeGen::CGBuilderTy Class Reference

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/CodeGen/CGBuilder.h"

Inheritance diagram for clang::CodeGen::CGBuilderTy:
Inheritance graph
[legend]
Collaboration diagram for clang::CodeGen::CGBuilderTy:
Collaboration graph
[legend]

Public Member Functions

 CGBuilderTy (const CodeGenTypeCache &TypeCache, llvm::LLVMContext &C)
 
 CGBuilderTy (const CodeGenTypeCache &TypeCache, llvm::LLVMContext &C, const llvm::ConstantFolder &F, const CGBuilderInserterTy &Inserter)
 
 CGBuilderTy (const CodeGenTypeCache &TypeCache, llvm::Instruction *I)
 
 CGBuilderTy (const CodeGenTypeCache &TypeCache, llvm::BasicBlock *BB)
 
llvm::ConstantInt * getSize (CharUnits N)
 
llvm::ConstantInt * getSize (uint64_t N)
 
llvm::LoadInst * CreateLoad (Address Addr, const llvm::Twine &Name="")
 
llvm::LoadInst * CreateLoad (Address Addr, const char *Name)
 
llvm::LoadInst * CreateLoad (Address Addr, bool IsVolatile, const llvm::Twine &Name="")
 
llvm::LoadInst * CreateAlignedLoad (llvm::Value *Addr, CharUnits Align, const llvm::Twine &Name="")
 
llvm::LoadInst * CreateAlignedLoad (llvm::Value *Addr, CharUnits Align, const char *Name)
 
llvm::LoadInst * CreateAlignedLoad (llvm::Type *Ty, llvm::Value *Addr, CharUnits Align, const llvm::Twine &Name="")
 
llvm::StoreInst * CreateStore (llvm::Value *Val, Address Addr, bool IsVolatile=false)
 
llvm::StoreInst * CreateAlignedStore (llvm::Value *Val, llvm::Value *Addr, CharUnits Align, bool IsVolatile=false)
 
llvm::StoreInst * CreateDefaultAlignedStore (llvm::Value *Val, llvm::Value *Addr, bool IsVolatile=false)
 
llvm::LoadInst * CreateFlagLoad (llvm::Value *Addr, const llvm::Twine &Name="")
 Emit a load from an i1 flag variable. More...
 
llvm::StoreInst * CreateFlagStore (bool Value, llvm::Value *Addr)
 Emit a store to an i1 flag variable. More...
 
Address CreateBitCast (Address Addr, llvm::Type *Ty, const llvm::Twine &Name="")
 
Address CreateAddrSpaceCast (Address Addr, llvm::Type *Ty, const llvm::Twine &Name="")
 
Address CreateElementBitCast (Address Addr, llvm::Type *Ty, const llvm::Twine &Name="")
 Cast the element type of the given address to a different type, preserving information like the alignment and address space. More...
 
Address CreatePointerBitCastOrAddrSpaceCast (Address Addr, llvm::Type *Ty, const llvm::Twine &Name="")
 
Address CreateStructGEP (Address Addr, unsigned Index, CharUnits Offset, const llvm::Twine &Name="")
 
Address CreateStructGEP (Address Addr, unsigned Index, const llvm::StructLayout *Layout, const llvm::Twine &Name="")
 
Address CreateConstArrayGEP (Address Addr, uint64_t Index, CharUnits EltSize, const llvm::Twine &Name="")
 Given addr = [n x T]* ... More...
 
Address CreateConstInBoundsGEP (Address Addr, uint64_t Index, CharUnits EltSize, const llvm::Twine &Name="")
 Given addr = T* ... More...
 
Address CreateConstGEP (Address Addr, uint64_t Index, CharUnits EltSize, const llvm::Twine &Name="")
 Given addr = T* ... More...
 
Address CreateConstInBoundsByteGEP (Address Addr, CharUnits Offset, const llvm::Twine &Name="")
 Given a pointer to i8, adjust it by a given constant offset. More...
 
Address CreateConstByteGEP (Address Addr, CharUnits Offset, const llvm::Twine &Name="")
 
llvm::ValueCreateConstInBoundsByteGEP (llvm::Value *Ptr, CharUnits Offset, const llvm::Twine &Name="")
 
llvm::ValueCreateConstByteGEP (llvm::Value *Ptr, CharUnits Offset, const llvm::Twine &Name="")
 
llvm::CallInst * CreateMemCpy (Address Dest, Address Src, llvm::Value *Size, bool IsVolatile=false)
 
llvm::CallInst * CreateMemCpy (Address Dest, Address Src, uint64_t Size, bool IsVolatile=false)
 
llvm::CallInst * CreateMemMove (Address Dest, Address Src, llvm::Value *Size, bool IsVolatile=false)
 
llvm::CallInst * CreateMemSet (Address Dest, llvm::Value *Value, llvm::Value *Size, bool IsVolatile=false)
 

Detailed Description

Definition at line 45 of file CGBuilder.h.

Constructor & Destructor Documentation

◆ CGBuilderTy() [1/4]

clang::CodeGen::CGBuilderTy::CGBuilderTy ( const CodeGenTypeCache TypeCache,
llvm::LLVMContext &  C 
)
inline

Definition at line 50 of file CGBuilder.h.

◆ CGBuilderTy() [2/4]

clang::CodeGen::CGBuilderTy::CGBuilderTy ( const CodeGenTypeCache TypeCache,
llvm::LLVMContext &  C,
const llvm::ConstantFolder &  F,
const CGBuilderInserterTy Inserter 
)
inline

Definition at line 52 of file CGBuilder.h.

◆ CGBuilderTy() [3/4]

clang::CodeGen::CGBuilderTy::CGBuilderTy ( const CodeGenTypeCache TypeCache,
llvm::Instruction *  I 
)
inline

Definition at line 56 of file CGBuilder.h.

◆ CGBuilderTy() [4/4]

clang::CodeGen::CGBuilderTy::CGBuilderTy ( const CodeGenTypeCache TypeCache,
llvm::BasicBlock *  BB 
)
inline

Definition at line 58 of file CGBuilder.h.

Member Function Documentation

◆ CreateAddrSpaceCast()

Address clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast ( Address  Addr,
llvm::Type Ty,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 149 of file CGBuilder.h.

◆ CreateAlignedLoad() [1/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateAlignedLoad ( llvm::Value Addr,
CharUnits  Align,
const llvm::Twine &  Name = "" 
)
inline

◆ CreateAlignedLoad() [2/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateAlignedLoad ( llvm::Value Addr,
CharUnits  Align,
const char *  Name 
)
inline

Definition at line 95 of file CGBuilder.h.

◆ CreateAlignedLoad() [3/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateAlignedLoad ( llvm::Type Ty,
llvm::Value Addr,
CharUnits  Align,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 99 of file CGBuilder.h.

◆ CreateAlignedStore()

llvm::StoreInst* clang::CodeGen::CGBuilderTy::CreateAlignedStore ( llvm::Value Val,
llvm::Value Addr,
CharUnits  Align,
bool  IsVolatile = false 
)
inline

◆ CreateBitCast()

Address clang::CodeGen::CGBuilderTy::CreateBitCast ( Address  Addr,
llvm::Type Ty,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 142 of file CGBuilder.h.

Referenced by AddDirectArgument(), AddVariableConstraints(), AdjustObjCObjectType(), ApplyNonVirtualAndVirtualOffset(), BuildAppleKextVirtualCall(), CoerceIntOrPtrToIntOrPtr(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CodeGenFunction::EmitAnnotationCall(), emitARCCopyOperation(), clang::CodeGen::CodeGenFunction::EmitARCDestroyWeak(), emitARCLoadOperation(), clang::CodeGen::CodeGenFunction::EmitARCRelease(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutorelease(), emitARCStoreOperation(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrongCall(), emitARCValueOperation(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), emitCatchDispatchBlock(), clang::CodeGen::CodeGenFunction::EmitCfiSlowPathCheck(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckValue(), EmitCommonNeonSISDBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitExtendGCLifetime(), clang::CodeGen::CodeGenFunction::EmitLifetimeEnd(), clang::CodeGen::CodeGenFunction::EmitLifetimeStart(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCThrowOperand(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitPointerArithmetic(), clang::CodeGen::emitRegistrationFunction(), emitRTtypeidCall(), EmitSignBit(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), EmitX86MaskedLoad(), EmitX86MaskedStore(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getBadTypeidFn(), GetGCAttrTypeForType(), getMaskVecValue(), InitCatchParam(), isCheapEnoughToEvaluateUnconditionally(), isWeakLinkedClass(), performTypeAdjustment(), rewriteInputConstraintReferences(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), and tryRemoveRetainOfSelf().

◆ CreateConstArrayGEP()

Address clang::CodeGen::CGBuilderTy::CreateConstArrayGEP ( Address  Addr,
uint64_t  Index,
CharUnits  EltSize,
const llvm::Twine &  Name = "" 
)
inline

Given addr = [n x T]* ...

produce name = getelementptr inbounds addr, i64 0, i64 index where i64 is actually the target word size.

This API assumes that drilling into an array like this is always an inbounds operation.

Parameters
EltSize- the size of the type T in bytes

Definition at line 195 of file CGBuilder.h.

Referenced by emitAddrOfVarFromArray(), and clang::CodeGen::emitTaskCall().

◆ CreateConstByteGEP() [1/2]

Address clang::CodeGen::CGBuilderTy::CreateConstByteGEP ( Address  Addr,
CharUnits  Offset,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 240 of file CGBuilder.h.

◆ CreateConstByteGEP() [2/2]

llvm::Value* clang::CodeGen::CGBuilderTy::CreateConstByteGEP ( llvm::Value Ptr,
CharUnits  Offset,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 252 of file CGBuilder.h.

◆ CreateConstGEP()

Address clang::CodeGen::CGBuilderTy::CreateConstGEP ( Address  Addr,
uint64_t  Index,
CharUnits  EltSize,
const llvm::Twine &  Name = "" 
)
inline

Given addr = T* ...

produce name = getelementptr inbounds addr, i64 index where i64 is actually the target word size.

Parameters
EltSize- the size of the type T in bytes

Definition at line 226 of file CGBuilder.h.

◆ CreateConstInBoundsByteGEP() [1/2]

Address clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP ( Address  Addr,
CharUnits  Offset,
const llvm::Twine &  Name = "" 
)
inline

◆ CreateConstInBoundsByteGEP() [2/2]

llvm::Value* clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP ( llvm::Value Ptr,
CharUnits  Offset,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 247 of file CGBuilder.h.

◆ CreateConstInBoundsGEP()

Address clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP ( Address  Addr,
uint64_t  Index,
CharUnits  EltSize,
const llvm::Twine &  Name = "" 
)
inline

Given addr = T* ...

produce name = getelementptr inbounds addr, i64 index where i64 is actually the target word size.

Parameters
EltSize- the size of the type T in bytes

Definition at line 211 of file CGBuilder.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementLValue(), and performTypeAdjustment().

◆ CreateDefaultAlignedStore()

llvm::StoreInst* clang::CodeGen::CGBuilderTy::CreateDefaultAlignedStore ( llvm::Value Val,
llvm::Value Addr,
bool  IsVolatile = false 
)
inline

Definition at line 122 of file CGBuilder.h.

Referenced by emitStoresForInitAfterMemset().

◆ CreateElementBitCast()

Address clang::CodeGen::CGBuilderTy::CreateElementBitCast ( Address  Addr,
llvm::Type Ty,
const llvm::Twine &  Name = "" 
)
inline

◆ CreateFlagLoad()

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateFlagLoad ( llvm::Value Addr,
const llvm::Twine &  Name = "" 
)
inline

Emit a load from an i1 flag variable.

Definition at line 129 of file CGBuilder.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().

◆ CreateFlagStore()

llvm::StoreInst* clang::CodeGen::CGBuilderTy::CreateFlagStore ( bool  Value,
llvm::Value Addr 
)
inline

Emit a store to an i1 flag variable.

Definition at line 136 of file CGBuilder.h.

References clang::CharUnits::One().

Referenced by clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().

◆ CreateLoad() [1/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateLoad ( Address  Addr,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 70 of file CGBuilder.h.

Referenced by AddVariableConstraints(), CreateCoercedLoad(), clang::CodeGen::CodeGenFunction::DecodeAddrUsedInPrologue(), emitAddrOfVarFromArray(), clang::CodeGen::CodeGenFunction::EmitARCDestroyStrong(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), EmitAtomicUpdateValue(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), EmitCleanup(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitCopyprivateCopyFunction(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitPartialArrayDestroy(), emitReductionCombiner(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CGCXXABI::EmitThisParam(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), emitVoidPtrDirectVAArg(), emitVoidPtrVAArg(), emitWriteback(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getNonNullAttr(), isCheapEnoughToEvaluateUnconditionally(), and performTypeAdjustment().

◆ CreateLoad() [2/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateLoad ( Address  Addr,
const char *  Name 
)
inline

Definition at line 75 of file CGBuilder.h.

◆ CreateLoad() [3/3]

llvm::LoadInst* clang::CodeGen::CGBuilderTy::CreateLoad ( Address  Addr,
bool  IsVolatile,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 82 of file CGBuilder.h.

◆ CreateMemCpy() [1/2]

llvm::CallInst* clang::CodeGen::CGBuilderTy::CreateMemCpy ( Address  Dest,
Address  Src,
llvm::Value Size,
bool  IsVolatile = false 
)
inline

◆ CreateMemCpy() [2/2]

llvm::CallInst* clang::CodeGen::CGBuilderTy::CreateMemCpy ( Address  Dest,
Address  Src,
uint64_t  Size,
bool  IsVolatile = false 
)
inline

◆ CreateMemMove()

llvm::CallInst* clang::CodeGen::CGBuilderTy::CreateMemMove ( Address  Dest,
Address  Src,
llvm::Value Size,
bool  IsVolatile = false 
)
inline

◆ CreateMemSet()

llvm::CallInst* clang::CodeGen::CGBuilderTy::CreateMemSet ( Address  Dest,
llvm::Value Value,
llvm::Value Size,
bool  IsVolatile = false 
)
inline

◆ CreatePointerBitCastOrAddrSpaceCast()

Address clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast ( Address  Addr,
llvm::Type Ty,
const llvm::Twine &  Name = "" 
)
inline

◆ CreateStore()

llvm::StoreInst* clang::CodeGen::CGBuilderTy::CreateStore ( llvm::Value Val,
Address  Addr,
bool  IsVolatile = false 
)
inline

◆ CreateStructGEP() [1/2]

Address clang::CodeGen::CGBuilderTy::CreateStructGEP ( Address  Addr,
unsigned  Index,
CharUnits  Offset,
const llvm::Twine &  Name = "" 
)
inline

◆ CreateStructGEP() [2/2]

Address clang::CodeGen::CGBuilderTy::CreateStructGEP ( Address  Addr,
unsigned  Index,
const llvm::StructLayout *  Layout,
const llvm::Twine &  Name = "" 
)
inline

Definition at line 178 of file CGBuilder.h.

◆ getSize() [1/2]

llvm::ConstantInt* clang::CodeGen::CGBuilderTy::getSize ( CharUnits  N)
inline

◆ getSize() [2/2]

llvm::ConstantInt* clang::CodeGen::CGBuilderTy::getSize ( uint64_t  N)
inline

Definition at line 64 of file CGBuilder.h.

References clang::CodeGen::CodeGenTypeCache::SizeTy.


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