RFR: 8250269: Replace ATTRIBUTE_ALIGNED with alignas [v14]

Julian Waters jwaters at openjdk.org
Tue Jan 31 09:21:36 UTC 2023


> C++11 added the alignas attribute, for the purpose of specifying alignment on types, much like compiler specific syntax such as gcc's __attribute__((aligned(x))) or Visual C++'s __declspec(align(x)).
> 
> We can phase out the use of the macro in favor of the standard attribute. In the meantime, we can replace the compiler specific definitions of ATTRIBUTE_ALIGNED with a portable definition. We might deprecate the use of the macro but changing its implementation quickly and cleanly applies the feature where the macro is being used.
> 
> Note: With certain parts of HotSpot using ATTRIBUTE_ALIGNED so indiscriminately, this commit will likely take some time to get right
> 
> This will require adding the alignas attribute to the list of language features approved for use in HotSpot code. (Completed with [8297912](https://github.com/openjdk/jdk/pull/11446))

Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 13 additional commits since the last revision:

 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - Merge branch 'openjdk:master' into alignas
 - ATTRIBUTE_ALIGNED(16)
 - Merge branch 'openjdk:master' into alignas
 - ... and 3 more: https://git.openjdk.org/jdk/compare/a88000cb...b36f835c

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/11431/files
  - new: https://git.openjdk.org/jdk/pull/11431/files/7792baa5..b36f835c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11431&range=13
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11431&range=12-13

  Stats: 40974 lines in 2196 files changed: 16048 ins; 6327 del; 18599 mod
  Patch: https://git.openjdk.org/jdk/pull/11431.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11431/head:pull/11431

PR: https://git.openjdk.org/jdk/pull/11431


More information about the hotspot-dev mailing list