This is an archive of the discontinued LLVM Phabricator instance.

Use an offset from TOS for idempotent rmw locked op lowering
ClosedPublic

Authored by reames on May 13 2019, 9:52 AM.

Diff Detail

Event Timeline

reames created this revision.May 13 2019, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2019, 9:52 AM
craig.topper added inline comments.May 13 2019, 11:57 AM
lib/Target/X86/X86ISelLowering.cpp
26309

I think the usual name here would be either TFI or TFL. The type returned is a derived class of TargetFrameLowering.

reames updated this revision to Diff 199372.May 13 2019, 10:48 PM

Address review comment, and update one test I'd missed previously.

jfb accepted this revision.May 14 2019, 9:10 AM
jfb added a subscriber: chandlerc.

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

test/CodeGen/X86/speculative-load-hardening.ll
1148

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.

This revision is now accepted and ready to land.May 14 2019, 9:10 AM
This revision was automatically updated to reflect the committed changes.