[llvm-dev] [MemorySSA] inserting or removing memory instructions

Piotr Padlewski via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 17 13:19:05 PST 2017


Hi guys,
a question about updating memory SSA:
Is it expected that e.g insertion of MemoryDef doesn't change all dominated
uses?
For example test case CreateLoadsAndStoreUpdater produces:

define void @F(i8*) {
; 1 = MemoryDef(liveOnEntry)
  store i8 16, i8* %0
; 4 = MemoryDef(1)
  store i8 16, i8* %0
  br i1 true, label %2, label %3

; <label>:2:                                      ; preds = %1
; 2 = MemoryDef(4)
  store i8 16, i8* %0
  br label %4

; <label>:3:                                      ; preds = %1
  br label %4

; <label>:4:                                      ; preds = %3, %2
; 3 = MemoryPhi({%3,4},{%2,2})
; MemoryUse(3)
  %5 = load i8, i8* %0
; MemoryUse(1)
  %6 = load i8, i8* %0
}

What is the general behavior that I can expect when I insert or remove
def/use?
Another general question: what is the use of MemorySSAUpdater? When should
I use updater and when the MemorySSA API is sufficient?

Piotr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170217/1027a4b3/attachment.html>


More information about the llvm-dev mailing list