<div dir="ltr">Also note: BFS or a hybrid DFS scheme is required to actually fulfill the API guarantee we make - that we will give you the nearest dominating access.<div>DFS may find an access that is dominating but not the nearest dominating one, depending on what paths it follows.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 4, 2016 at 10:14 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberlin updated this revision to Diff 43896.<br>
dberlin added a comment.<br>
<br>
Refactor and rewrite a lot of stuff.  This is somewhat of an intermediate state, so it's a bit messier than i'd like.<br>
This version builds but i haven't played with it in a few months, so i expect it is bitrotted and may be a bit broken.<br>
I am updating it mainly to give someone else a chance to takeover since i'm going to be swamped for a while.<br>
<br>
Main algorithmic changes:<br>
We now use BFS to find nearest dominating access in the caching walker.<br>
I've performed extensive performance testing of hybrid DFS and BFS schemes, and BFS wins every time.<br>
A bunch of things have started being iteratorized.<br>
The caching walker has been modified a bit.  The current caching scheme is fast, but can't easily be invalidated on a per-access basis.<br>
The overhead of simple schemes that supported that level of invalidation was *quite* large.<br>
(the ideal caching storage scheme here is actually quadtrees).<br>
<br>
The caching walker now uses the same phi translation mechanism that memorydepedenceanalysis does.<br>
I'm not sure this is a good thing, as that phi translation mechanism is ... strange and weird and has weird optimizations embedded in it.<br>
It may be better to get worse optimization to start and clean that stuff up.<br>
<br>
Updating D7864: This patch introduces MemorySSA, a virtual SSA form for memory.<br>
===============================================================================<br>
<span class=""><br>
Details on what it looks like are in MemorySSA.h<br>
<br>
<br>
</span><a href="http://reviews.llvm.org/D7864" rel="noreferrer" target="_blank">http://reviews.llvm.org/D7864</a><br>
<br>
Files:<br>
  include/llvm/IR/Function.h<br>
  include/llvm/InitializePasses.h<br>
  include/llvm/Transforms/Utils/MemorySSA.h<br>
  lib/Analysis/Analysis.cpp<br>
  lib/IR/AsmWriter.cpp<br>
  lib/Transforms/Utils/CMakeLists.txt<br>
  lib/Transforms/Utils/MemorySSA.cpp<br>
  test/Transforms/Util/memoryssa-cyclicphi.ll<br>
  test/Transforms/Util/memoryssa-no-disconnected.ll<br>
  test/Transforms/Util/memoryssa-optimize-use.ll<br>
<br>
</blockquote></div><br></div>