[Openmp-commits] [PATCH] D60894: openmp: Align kmp_int64 and kmp_uint64 to 64 bits.

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 19 10:49:24 PDT 2019


AndreyChurbanov added a comment.

Not sure this is a good change, e.g. gcc produces tons of warnings:

  warning: ignoring attributes on template argument 'kmp_uint64 {aka long long unsigned int}' [-Wignored-attributes]
    std::atomic<kmp_uint64> next_ticket;
                          ^

and apparently ignores the attribute.  Strictly, C++ does not allow to specify alignment in typedef, AFAIK. Though many compilers may support this.

Maybe it would be better to align objects, not types. There should not be many 64-bit atomic objects in the code those need explicit alignment, I think.  And there are places where (poorly aligned) pair of 4-byte integers is changes atomically as a single 8-bype object.  We may need to reorder structure fields then, as aligned type won't help here.

Just my 2c.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60894





More information about the Openmp-commits mailing list