[PATCH] D137980: [ARM] Pretend atomics are always lock-free for small widths.

2023-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Herald added a subscriber: StephenFan. Any further comment on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137980/new/ https://reviews.llvm.org/D137980 ___ cfe-commits ma

[PATCH] D137980: [ARM] Pretend atomics are always lock-free for small widths.

2022-11-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. So gcc has two different behaviors on ARM: - On linux, prefers `__sync` calls, and generates inline code for load/store. - On baremetal, gcc chooses what sort of atomic call to generate based on how the source code is written: if the user writes `__sync`, you get `__syn

[PATCH] D137980: [ARM] Pretend atomics are always lock-free for small widths.

2022-11-17 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. Looking at GCC it looks like there (for cortex-m0 at least) the behaviour is that loads and stores are generated inline, but more complex operations go to the atomic library calls (not the sync library calls). e.g. for int x, y; int fn() { return __atomic_loa

[PATCH] D137980: [ARM] Pretend atomics are always lock-free for small widths.

2022-11-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: nikic, t.p.northover, john.brawn, joerg, tomhughes, alanphipps, aykevl. Herald added subscribers: s.egerton, simoncook, hiraditya, kristof.beyls. Herald added a project: All. efriedma requested review of this revision. Herald added subscrib