[PATCH] D15337: [EarlyCSE] Value forwarding for unordered atomics

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 10:05:08 PST 2015


reames created this revision.
reames added reviewers: jfb, sanjoy, dberlin, morisset, hfinkel.
reames added a subscriber: llvm-commits.

This patch teaches the fully redundant load part of EarlyCSE how to forward from atomic and volatile loads and stores, and how to eliminate unordered atomics (only).  This patch does not include dead store elimination support for unordered atomics, that will follow in the near future.

The basic idea is that we allow all loads and stores to be tracked by the AvailableLoad table.  We store a bit in the table which tracks whether load/store was atomic, and then only replace atomic loads with ones which were also atomic.  

No attempt is made to refine our handling of ordered loads or stores.  Those are still treated as full fences.  We could pretty easily extend the release fence handling to release stores, but that should be a separate patch

http://reviews.llvm.org/D15337

Files:
  lib/Transforms/Scalar/EarlyCSE.cpp
  test/Transforms/EarlyCSE/atomics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15337.42188.patch
Type: text/x-patch
Size: 10770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151208/c3088641/attachment.bin>


More information about the llvm-commits mailing list