koops added a comment.

>> However, generic_loop_messages.cpp & generic_loop_ast_print.cpp are present 
>> and provide a good coverage.
>
> I rather doubt that these tests provide good coverage, since you're changing 
> the directive kind here on the fly. This is a very new functionality, which 
> was not tested before.
> Add the tests for nesting of the regions, i.e. loop bind directive, enclosed 
> in different regions, and diagnostics.

In  https://reviews.llvm.org/D145823 : Add codegen for combined 'loop' 
directives, I see the following code
void CodeGenFunction::EmitOMPParallelGenericLoopDirective() {
....
....

  emitCommonOMPParallelDirective(*this, S, OMPD_for, CodeGen, 
emitEmptyBoundParameters);

....
....
}
Here, the GenericLoopDirective is being changed to OMPD_for because of the 
Parallel Directive. Similarly,

void CodeGenFunction::EmitOMPTeamsGenericLoopDirective() {
....
....

  CGF.CGM.getOpenMPRuntime().emitInlinedDirective(CGF, OMPD_distribute, 
CodeGenDistribute);

....
....
}
Here, GenericLoopDirective is being mapped to OMPD_distribute because of the 
Teams construct. These changes are very similar to mine. I still do not 
understand why you are saying "This is a very new functionality". Anyway, if 
you can at least provide me some directions on which are all the "enclosed in 
different regions" it will be helpful.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144634/new/

https://reviews.llvm.org/D144634

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to