[PATCH] This patch introduces MemorySSA, a virtual SSA form for memory.Details on what it looks like are in MemorySSA.h

Daniel Berlin dberlin at dberlin.org
Wed Feb 25 14:13:56 PST 2015


================
Comment at: include/llvm/Transforms/Utils/MemorySSA.h:12
@@ +11,3 @@
+// This file exposes an interface to building/using memory SSA to walk memory
+// instructions using a use/def graph
+//
----------------
reames wrote:
> This comment will need to be expanded at some point.  That can wait until the code is closer to ready though.  
> 
> Correction, the comment I wanted was below.  Might make sense to move some of it into the file comment or provide a forward reference.
fixed

================
Comment at: include/llvm/Transforms/Utils/MemorySSA.h:30
@@ +29,3 @@
+// Memory SSA class builds an SSA form that links together the
+// loads, stores, and clobbers (atomics, calls, etc) of a program,
+// so they can be walked easily.
----------------
reames wrote:
> I would phrase this as: links together memory access instructions such as loads, stores, ...
fixed

================
Comment at: include/llvm/Transforms/Utils/MemorySSA.h:91
@@ +90,3 @@
+
+  AccessType getType() const { return Type; }
+  virtual ~MemoryAccess() {}
----------------
reames wrote:
> I might avoid the term "Type" here since that has a well defined meaning in LLVM.  Using AccessType consistently would be clearer.  
Fixed

================
Comment at: include/llvm/Transforms/Utils/MemorySSA.h:155
@@ +154,3 @@
+
+  unsigned int getDefVersion() { return DefVersion; }
+  void setDefVersion(unsigned int v) { DefVersion = v; }
----------------
reames wrote:
> I'm not sure we need an explicit def version here.  Doesn't the address of the underlying instruction serve that purpose as well?  (And when that instruction disappears, we need to renumber anyways.)
fixed in version i'm about to upload

This does make debugging a bit harder (IMHO), but such is life :)

http://reviews.llvm.org/D7864

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list