clang
3.9.0
|
#include "CodeGenFunction.h"
#include "CGObjCRuntime.h"
#include "CodeGenModule.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Intrinsics.h"
Go to the source code of this file.
Functions | |
static bool | isTrivialFiller (Expr *E) |
Determine if E is a trivial array filler, that is, one that is equivalent to zero-initialization. More... | |
static Expr * | findPeephole (Expr *op, CastKind kind) |
Attempt to look through various unimportant expressions to find a cast of the given kind. More... | |
static bool | isBlockVarRef (const Expr *E) |
Is the value of the given expression possibly a reference to or into a __block variable? More... | |
static bool | isSimpleZero (const Expr *E, CodeGenFunction &CGF) |
isSimpleZero - If emitting this value will obviously just cause a store of zero to memory, return true. More... | |
static CharUnits | GetNumNonZeroBytesInInit (const Expr *E, CodeGenFunction &CGF) |
GetNumNonZeroBytesInInit - Get an approximate count of the number of non-zero bytes that will be stored when outputting the initializer for the specified initializer expression. More... | |
static void | CheckAggExprForMemSetUse (AggValueSlot &Slot, const Expr *E, CodeGenFunction &CGF) |
CheckAggExprForMemSetUse - If the initializer is large and has a lot of zeros in it, emit a memset and avoid storing the individual zeros. More... | |
|
static |
CheckAggExprForMemSetUse - If the initializer is large and has a lot of zeros in it, emit a memset and avoid storing the individual zeros.
Definition at line 1392 of file CGExprAgg.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CharUnits::fromQuantity(), clang::CodeGen::AggValueSlot::getAddress(), clang::ASTContext::getBaseElementType(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLangOpts(), GetNumNonZeroBytesInInit(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::isValid(), clang::CodeGen::AggValueSlot::isVolatile(), clang::CodeGen::AggValueSlot::isZeroed(), and clang::CodeGen::AggValueSlot::setZeroed().
Referenced by clang::CodeGen::CodeGenFunction::EmitAggExpr().
Attempt to look through various unimportant expressions to find a cast of the given kind.
Definition at line 562 of file CGExprAgg.cpp.
References clang::Expr::IgnoreParens().
|
static |
GetNumNonZeroBytesInInit - Get an approximate count of the number of non-zero bytes that will be stored when outputting the initializer for the specified initializer expression.
Definition at line 1334 of file CGExprAgg.cpp.
References E, clang::RecordDecl::fields(), clang::Type::getAs(), clang::CodeGen::CodeGenFunction::getContext(), clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), clang::TargetInfo::getPointerWidth(), clang::CodeGen::CodeGenFunction::getTarget(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenFunction::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::Expr::IgnoreParens(), clang::Type::isIncompleteArrayType(), clang::Type::isReferenceType(), isSimpleZero(), clang::FieldDecl::isUnnamedBitfield(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::ASTContext::toCharUnitsFromBits(), and clang::CharUnits::Zero().
Referenced by CheckAggExprForMemSetUse().
Is the value of the given expression possibly a reference to or into a __block variable?
Definition at line 797 of file CGExprAgg.cpp.
References clang::cast(), and clang::Expr::IgnoreParens().
|
static |
isSimpleZero - If emitting this value will obviously just cause a store of zero to memory, return true.
This can return false if uncertain, so it just handles simple cases.
Definition at line 1037 of file CGExprAgg.cpp.
References clang::Expr::getType(), clang::CodeGen::CodeGenFunction::getTypes(), clang::Expr::IgnoreParens(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().
Referenced by GetNumNonZeroBytesInInit().
Determine if E is a trivial array filler, that is, one that is equivalent to zero-initialization.
Definition at line 380 of file CGExprAgg.cpp.