[PATCH] D16875: MemorySSA Optimizations: Patch 1 of N

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 21:22:00 PST 2016


george.burgess.iv created this revision.
george.burgess.iv added reviewers: hfinkel, reames.
george.burgess.iv added subscribers: dberlin, davidxl, llvm-commits.

This patch re-adds two of the optimizations that were taken out of MemorySSA due to sketchiness.

Specifically:

- We now try to take advantage of memory ordering rules on loads before querying AA
- We recognize and appropriately react to invariant loads, and loads that AA can prove point constant memory.

Note that the memory ordering check was strengthened to `Monotonic`, because that's the equivalent of `std::memory_order_relaxed`, which guarantees no ordering whatsoever, AFAIK.

Also note that I'm not an expert in memory models. So if anything seems fishy, let me know. :)

http://reviews.llvm.org/D16875

Files:
  lib/Transforms/Utils/MemorySSA.cpp
  test/Transforms/Util/MemorySSA/atomic-clobber.ll
  test/Transforms/Util/MemorySSA/constant-memory.ll
  test/Transforms/Util/MemorySSA/load-invariant.ll
  test/Transforms/Util/MemorySSA/volatile-clobber.ll
  test/Transforms/Util/invariant-groups.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16875.46869.patch
Type: text/x-patch
Size: 10088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160204/b6524f25/attachment.bin>


More information about the llvm-commits mailing list