[PATCH] D44891: [RFC][Memory Dependency Analysis] Not clobber load value by store if the store value won't change load content
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 27 23:16:44 PDT 2018
shiva0217 added a comment.
In https://reviews.llvm.org/D44891#1048252, @dberlin wrote:
> This isn't correct in the face of atomics and volatiles, and IMHO, MemoryDependence should not be performing this optimization.
> If you want, teach GVN to requery MemDep in these cases.
Hi @dberlin.
The patch code will not apply when face atomics and volatiles due to MemoryDependence has atomic and volatile checking before entering this part.
It detects the case in the summary, and then MemDep will not clobber "LItoSI" load value by store and then GVN could remove "QueryInst" load by requiring MemDep.
So the patch will not perform optimization by itself, it will let GVN deal with it.
Repository:
rL LLVM
https://reviews.llvm.org/D44891
More information about the llvm-commits
mailing list