mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 13:21:04 +08:00
[OPENMP 4.0] Codegen for 'declare reduction' construct.
Emit function for 'combiner' part of 'declare reduction' construct and 'initialilzer' part, if any. llvm-svn: 262699
This commit is contained in:
@@ -1543,10 +1543,17 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
|
||||
}
|
||||
}
|
||||
|
||||
// If this is OpenMP device, check if it is legal to emit this global
|
||||
// normally.
|
||||
if (OpenMPRuntime && OpenMPRuntime->emitTargetGlobal(GD))
|
||||
return;
|
||||
if (LangOpts.OpenMP) {
|
||||
// If this is OpenMP device, check if it is legal to emit this global
|
||||
// normally.
|
||||
if (OpenMPRuntime && OpenMPRuntime->emitTargetGlobal(GD))
|
||||
return;
|
||||
if (auto *DRD = dyn_cast<OMPDeclareReductionDecl>(Global)) {
|
||||
if (MustBeEmitted(Global))
|
||||
EmitOMPDeclareReduction(DRD);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore declarations, they will be emitted on their first use.
|
||||
if (const auto *FD = dyn_cast<FunctionDecl>(Global)) {
|
||||
|
||||
Reference in New Issue
Block a user