[PATCH] D61862: Use an offset from TOS for idempotent rmw locked op lowering

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 09:11:12 PDT 2019


jfb accepted this revision.
jfb added a subscriber: chandlerc.
jfb added a comment.
This revision is now accepted and ready to land.

One question for Chandler (which can be addressed as a follow up), otherwise LGTM.



================
Comment at: test/CodeGen/X86/speculative-load-hardening.ll:1148
 ; hardcoded reference to RSP+offset.
 define void @idempotent_atomic(i32* %x) speculative_load_hardening {
 ; X64-LABEL: idempotent_atomic:
----------------
I only just thought about this: should we stick to `mfence` when the function has attribute `speculative_load_hardening`? `mfence` forces much stronger ordering, and doesn't perform an idempotent load / store from the stack (which in this case brings in a new cacheline). Maybe @chandlerc should chime in.


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

https://reviews.llvm.org/D61862





More information about the llvm-commits mailing list