tianshilei1992 added a comment.

In D110286#3047943 <https://reviews.llvm.org/D110286#3047943>, @JonChesterfield 
wrote:

> I'm excited about the thread to warp mapping but unclear why this needs to be 
> a compile time flag. Can we use this mapping when pragma simd is present and 
> otherwise stay with the current one?

Like I mentioned in the description, when `__kmpc_target_init` is emitted, the 
body has not yet. If the target region is something like:

  #pragma omp target
  {
  #pragma omp parallel
    { /* parallel region */ }
  #pragma omp simd
    { /* simd region */ }
  }

Clang has no idea the target region actually contains a simd region. As a 
result, it cannot adjust the execution mode accordingly. Of course we can 
always change the value in middle end (such as `OpenMPOpt`), but it's not gonna 
work if it is not invoked.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110286

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

Reply via email to