[PATCH] D133949: Make sure the right parameter extension attributes are added in various instrumentation passes.

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 06:03:28 PST 2022


uweigand added a comment.

In D133949#3987273 <https://reviews.llvm.org/D133949#3987273>, @jonpa wrote:

> Don't know much about the signedness of the different args, which of course is important to get correct. I guess I have used zero-extension mostly - it would be good to get this reviewed properly. In OMPKinds.def I added ZExt to all narrow int args, except SExt for args marked with /* Int */.

You should simply follow the prototypes of the functions being called here.  Any signed integer type (smaller than word size) needs SExt, any unsigned integer type (smaller than word size) needs ZExt.

For the OMP routines, those prototypes appear to be in `openmp/runtime/src/kmp.h`:

  KMP_EXPORT void __kmpc_barrier(ident_t *, kmp_int32 global_tid);

where `kmp_int32` is defined as `int` on all supported platforms in `openmp/runtime/src/kmp_os.h`, so it is a signed type.


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

https://reviews.llvm.org/D133949



More information about the llvm-commits mailing list