[crac] RFR: Simplify CPUFeatures code [v3]

Jan Kratochvil jkratochvil at openjdk.org
Thu Apr 18 13:59:29 UTC 2024


> There is no functionality change. I guess the new code should be more simple and shorter. It was originally suggested by @AntonKozlov to use more functions than macros.
> 
> 
>  1 file changed, 44 insertions(+), 82 deletions(-)
>  ```
> So I find it clearly an improvement.
> The readable sub-commit is: https://github.com/openjdk/crac/pull/112/commits/6d9cb72b7a838dd4c9f107c5b71c4275005a0c23
> Otherwise it gets messed up by the other commit just renaming things.
> As an explanation: Original code had two lists of the same CPU features. An `EXCESSIVE` list and an `GLIBC_DISABLE` list. The had to be kept in sync (their sets being equal) which was sanity checked:
> 
>     if (PASTE_TOKENS(disable_handled_, kind) != PASTE_TOKENS(excessive_handled_, kind))                                                  \
> 
> So now there is the list just once (`EXCESSIVE`, the `GLIBC_DISABLE` one has been deleted). It looks stupid but when coding it I did not see it.
> Coding both variants of #136 was needlessly more difficult without this pull request applied and now I have to rebase this pull request.

Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:

  Remove iomanip fix

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

Changes:
  - all: https://git.openjdk.org/crac/pull/112/files
  - new: https://git.openjdk.org/crac/pull/112/files/3f1c3d26..9a81fb15

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=crac&pr=112&range=02
 - incr: https://webrevs.openjdk.org/?repo=crac&pr=112&range=01-02

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/crac/pull/112.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/112/head:pull/112

PR: https://git.openjdk.org/crac/pull/112


More information about the crac-dev mailing list