|
clang
5.0.0
|
Class intended to support codegen of all kind of the reduction clauses. More...
Public Member Functions | |
| ReductionCodeGen (ArrayRef< const Expr * > Shareds, ArrayRef< const Expr * > Privates, ArrayRef< const Expr * > ReductionOps) | |
| void | emitSharedLValue (CodeGenFunction &CGF, unsigned N) |
| Emits lvalue for a reduction item. More... | |
| void | emitAggregateType (CodeGenFunction &CGF, unsigned N) |
| Emits the code for the variable-modified type, if required. More... | |
| void | emitAggregateType (CodeGenFunction &CGF, unsigned N, llvm::Value *Size) |
| Emits the code for the variable-modified type, if required. More... | |
| void | emitInitialization (CodeGenFunction &CGF, unsigned N, Address PrivateAddr, LValue SharedLVal, llvm::function_ref< bool(CodeGenFunction &)> DefaultInit) |
| Performs initialization of the private copy for the reduction item. More... | |
| bool | needCleanups (unsigned N) |
| Returns true if the private copy requires cleanups. More... | |
| void | emitCleanups (CodeGenFunction &CGF, unsigned N, Address PrivateAddr) |
| Emits cleanup code for the reduction item. More... | |
| Address | adjustPrivateAddress (CodeGenFunction &CGF, unsigned N, Address PrivateAddr) |
Adjusts PrivatedAddr for using instead of the original variable address in normal operations. More... | |
| LValue | getSharedLValue (unsigned N) const |
| Returns LValue for the reduction item. More... | |
| std::pair< llvm::Value *, llvm::Value * > | getSizes (unsigned N) const |
| Returns the size of the reduction item (in chars and total number of elements in the item), or nullptr, if the size is a constant. More... | |
| const VarDecl * | getBaseDecl (unsigned N) const |
| Returns the base declaration of the reduction item. More... | |
| bool | usesReductionInitializer (unsigned N) const |
| Returns true if the initialization of the reduction item uses initializer from declare reduction construct. More... | |
Class intended to support codegen of all kind of the reduction clauses.
Definition at line 113 of file CGOpenMPRuntime.h.
| ReductionCodeGen::ReductionCodeGen | ( | ArrayRef< const Expr * > | Shareds, |
| ArrayRef< const Expr * > | Privates, | ||
| ArrayRef< const Expr * > | ReductionOps | ||
| ) |
Definition at line 891 of file CGOpenMPRuntime.cpp.
| Address ReductionCodeGen::adjustPrivateAddress | ( | CodeGenFunction & | CGF, |
| unsigned | N, | ||
| Address | PrivateAddr | ||
| ) |
Adjusts PrivatedAddr for using instead of the original variable address in normal operations.
| N | Number of the reduction item. |
| PrivateAddr | Address of the corresponding private item. |
Definition at line 1070 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::Base, clang::CodeGen::CodeGenFunction::Builder, castToBase(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::DeclRefExpr::getDecl(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getPointer(), clang::ValueDecl::getType(), and loadToBegin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit().
| void ReductionCodeGen::emitAggregateType | ( | CodeGenFunction & | CGF, |
| unsigned | N | ||
| ) |
Emits the code for the variable-modified type, if required.
| N | Number of the reduction item. |
Definition at line 914 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::CodeGen::RValue::get(), clang::ASTContext::getAsVariableArrayType(), clang::CodeGen::CodeGenFunction::getContext(), clang::VariableArrayType::getSizeExpr(), clang::CodeGen::CodeGenFunction::getTypeSize(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitReduceCombFunction(), emitReduceFiniFunction(), and emitReduceInitFunction().
| void ReductionCodeGen::emitAggregateType | ( | CodeGenFunction & | CGF, |
| unsigned | N, | ||
| llvm::Value * | Size | ||
| ) |
Emits the code for the variable-modified type, if required.
| N | Number of the reduction item. |
| Size | Size of the type in chars. |
Definition at line 952 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::CodeGen::RValue::get(), clang::ASTContext::getAsVariableArrayType(), clang::CodeGen::CodeGenFunction::getContext(), and clang::VariableArrayType::getSizeExpr().
| void ReductionCodeGen::emitCleanups | ( | CodeGenFunction & | CGF, |
| unsigned | N, | ||
| Address | PrivateAddr | ||
| ) |
Emits cleanup code for the reduction item.
| N | Number of the reduction item. |
| PrivateAddr | Address of the corresponding private item. |
Definition at line 1010 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), needCleanups(), and clang::CodeGen::CodeGenFunction::pushDestroy().
Referenced by emitReduceFiniFunction().
| void ReductionCodeGen::emitInitialization | ( | CodeGenFunction & | CGF, |
| unsigned | N, | ||
| Address | PrivateAddr, | ||
| LValue | SharedLVal, | ||
| llvm::function_ref< bool(CodeGenFunction &)> | DefaultInit | ||
| ) |
Performs initialization of the private copy for the reduction item.
| N | Number of the reduction item. |
| PrivateAddr | Address of the corresponding private item. |
| DefaultInit | Default initialization sequence that should be performed if no reduction specific initialization is found. |
| SharedLVal | Address of the original shared variable. |
Definition at line 972 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), emitInitWithReductionInitializer(), clang::CodeGen::LValue::getAddress(), clang::ASTContext::getAsArrayType(), clang::CodeGen::CodeGenFunction::getContext(), getReductionInit(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), and emitReduceInitFunction().
| void ReductionCodeGen::emitSharedLValue | ( | CodeGenFunction & | CGF, |
| unsigned | N | ||
| ) |
Emits lvalue for a reduction item.
| N | Number of the reduction item. |
Definition at line 907 of file CGOpenMPRuntime.cpp.
Returns the base declaration of the reduction item.
Definition at line 193 of file CGOpenMPRuntime.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit().
Returns LValue for the reduction item.
Definition at line 186 of file CGOpenMPRuntime.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), and clang::CodeGen::emitTaskReductionFixups().
|
inline |
Returns the size of the reduction item (in chars and total number of elements in the item), or nullptr, if the size is a constant.
Definition at line 189 of file CGOpenMPRuntime.h.
Referenced by emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), and clang::CodeGen::emitTaskReductionFixups().
Returns true if the private copy requires cleanups.
Definition at line 1002 of file CGOpenMPRuntime.cpp.
References clang::QualType::DK_none.
Referenced by emitCleanups(), and emitReduceFiniFunction().
Returns true if the initialization of the reduction item uses initializer from declare reduction construct.
Definition at line 1109 of file CGOpenMPRuntime.cpp.
References clang::OMPDeclareReductionDecl::getInitializer(), and getReductionInit().
Referenced by emitReduceInitFunction(), and clang::CodeGen::emitTaskReductionFixups().
1.8.6