@@ -456,7 +456,7 @@ void CodeGenFunction::EmitCilkSyncStmt(const CilkSyncStmt &S) {
456
456
void CodeGenFunction::EmitCilkScopeStmt (const CilkScopeStmt &S) {
457
457
LexicalScope CilkScope (*this , S.getSourceRange ());
458
458
459
- // If this _Cilk_scope is outermost in the function, emit
459
+ // If this cilk_scope is outermost in the function, emit
460
460
// tapir_runtime_{start,end} intrinsics around the scope.
461
461
bool ThisScopeIsOutermost = false ;
462
462
if (!WithinCilkScope) {
@@ -465,13 +465,14 @@ void CodeGenFunction::EmitCilkScopeStmt(const CilkScopeStmt &S) {
465
465
}
466
466
467
467
{
468
+ ScopeIsSynced = true ;
468
469
// Add a taskframe around this scope in case there are other spawns outside
469
470
// of this scope, which would need to be synced separately.
470
471
TaskFrameScope TFScope (*this );
471
472
if (ThisScopeIsOutermost && !CurSyncRegion) {
472
473
llvm::Instruction *TapirRTStart = Builder.CreateCall (
473
474
CGM.getIntrinsic (llvm::Intrinsic::tapir_runtime_start));
474
- // Mark the end of the _Cilk_scope with tapir_runtime_end.
475
+ // Mark the end of the cilk_scope with tapir_runtime_end.
475
476
EHStack.pushCleanup <TapirRuntimeEndCleanup>(NormalAndEHCleanup,
476
477
TapirRTStart);
477
478
}
@@ -485,8 +486,8 @@ void CodeGenFunction::EmitCilkScopeStmt(const CilkScopeStmt &S) {
485
486
EmitStmt (S.getBody ());
486
487
}
487
488
488
- // If this _Cilk_scope is outermost in the function, mark that CodeGen is no
489
- // longer emitting within a _Cilk_scope .
489
+ // If this cilk_scope is outermost in the function, mark that CodeGen is no
490
+ // longer emitting within a cilk_scope .
490
491
if (ThisScopeIsOutermost)
491
492
WithinCilkScope = false ;
492
493
}
0 commit comments