[PATCH] D29046: MemorySSA: Link all defs together into an intrusive defslist, to make updater easier

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 12:32:15 PST 2017


dberlin added a comment.

An example where spliceabove is broken:

  MemoryUse(0)
  use(a)
  2= MemoryDef(1)
  store b
  3 = MemoryDef(2)
  store a

Splice store a above use a produces:

  3 = MemoryDef(0)
  store a
  MemoryUse(3)
  use(a)
  2= MemoryDef(1)
  store b

This would work in SSA, because you would just have two variables live at the same time.
However, it does not work for MemorySSA, because only one variable may be live at a time, and therefore, you need to update downwards as well.

The only cases where the effects are truly local is when you splice into the middle of a block that has defs above or below you.


https://reviews.llvm.org/D29046





More information about the llvm-commits mailing list