[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 12:43:14 PDT 2018


Hahnfeld added a comment.

In https://reviews.llvm.org/D52733#1251421, @ABataev wrote:

> It might lead to increased register pressure, isn't it? Currently, I'm trying to emit the code that can be optimized out and, thus, may decrease the register pressure. That's why I tried to reduce the number of the runtime checks.


You are right, it's increasing register usage but I think it shouldn't: The generated code is always checking `__kmpc_is_spmd_exec_mode` first. So if LLVM would be able to optimize this out in SPMD mode, `__kmpc_parallel_level` should never be called.

I guess this doesn't work because it's illegal to hoist the load of `execution_param` across a barrier?


Repository:
  rC Clang

https://reviews.llvm.org/D52733





More information about the cfe-commits mailing list