This is an archive of the discontinued LLVM Phabricator instance.

Add hooks for emitLeading/TrailingFence in TargetLowering
ClosedPublic

Authored by morisset on Aug 18 2014, 3:06 PM.

Details

Reviewers
jfb
Summary

These hooks will be used in a later patch by AtomicExpandPass.
They will replace the current "target-independent"
AtomicExpandLoadLinkedPass::insertLeading/TrailingFence which are incorrect, but happen
to work on ARM where they are used.

Diff Detail

Event Timeline

morisset updated this revision to Diff 12629.Aug 18 2014, 3:06 PM
morisset retitled this revision from to Add hooks for emitLeading/TrailingFence in TargetLowering.
morisset updated this object.
morisset edited the test plan for this revision. (Show Details)
morisset added a reviewer: jfb.
morisset added subscribers: t.p.northover, Unknown Object (MLST).
jfb added inline comments.Aug 20 2014, 10:00 PM
include/llvm/Target/TargetLowering.h
962

I'm not sure if LLVM uses CAS in comments? It would be better to stay consistent can say CmpXchg.

963

Does this mean that the base implementation below can:

assert(!getInsertFencesForAtomic());

?

The comment should also s/insertFencesForAtomic/getInsertFencesForAtomic/

morisset updated this revision to Diff 12805.Aug 21 2014, 2:14 PM

Apply jfb suggestions.

jfb accepted this revision.Aug 21 2014, 2:26 PM
jfb edited edge metadata.

lgtm

This revision is now accepted and ready to land.Aug 21 2014, 2:26 PM
morisset closed this revision.Aug 21 2014, 3:27 PM

commited in r216232