Skip to content

Commit

Permalink
Merge pull request ocaml#13582 from tmcgilchrist/arm64_prefetch
Browse files Browse the repository at this point in the history
Enable software prefetching support for ARM64, s390x, PPC64 and Riscv
  • Loading branch information
gasche authored Feb 12, 2025
2 parents 9fb92d9 + 1c073d5 commit 1e2d88b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ Working version
Jan Midtgaard)

- #13736: Fix major GC pacing bug triggered by synchronous collections.
(Nick Barnes, review by ?)
(Nick Barnes, review by Damien Doligez and Tim McGilchrist)

- #13582: Enable software prefetching support for ARM64, s390x, PPC64 and RiscV.
Used during GC marking and sweeping to speed up both operations by
prefetching data.
(Tim McGilchrist, review by Nick Barnes, Antonin Décimo,
Stephen Dolan and Miod Vallat)

### Code generation and optimizations:

Expand Down
4 changes: 1 addition & 3 deletions runtime/caml/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ CAMLdeprecated_typedef(addr, char *);
/* Prefetching */

#ifdef CAML_INTERNALS
#if (__has_builtin(__builtin_prefetch) || defined(__GNUC__)) && \
(defined(__i386__) || defined(__x86_64__) || \
defined(_M_IX86) || defined(_M_AMD64))
#if (__has_builtin(__builtin_prefetch) || defined(__GNUC__))
#define caml_prefetch(p) __builtin_prefetch((p), 1, 3)
/* 1 = intent to write; 3 = all cache levels */
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
Expand Down

0 comments on commit 1e2d88b

Please sign in to comment.