Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load"...
authorShuxin Yang <shuxin.llvm@gmail.com>
Wed, 6 Mar 2013 17:48:48 +0000 (17:48 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Wed, 6 Mar 2013 17:48:48 +0000 (17:48 +0000)
commit985dac65791b9f6f631bdd51c18fe66592a67469
tree9265b2aa99cf3753755535652b74ad4683c4bcaf
parent186d8a3d67ccd2b2401c5d7d4e2cc15c4d1fdeae
Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.

The "invariant.load" metadata indicates the memory unit being accessed is immutable.
A load annotated with this metadata can be moved across any store.

As I am not sure if it is legal to move such loads across barrier/fence, this
change dose not allow such transformation.

rdar://11311484

Thank Arnold for code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176562 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/IR/LLVMContext.h
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/IR/LLVMContext.cpp
test/Analysis/BasicAA/invariant_load.ll [new file with mode: 0644]