[PATCH] D19821: [EarlyCSE] Optionally use MemorySSA. NFC.
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 14:27:50 PDT 2016
dberlin added inline comments.
================
Comment at: lib/Transforms/Scalar/EarlyCSE.cpp:537
@@ +536,3 @@
+ MemoryAccess *LaterDef =
+ MSSA->getWalker()->getClobberingMemoryAccess(LaterInst);
+ return MSSA->dominates(LaterDef, MSSA->getMemoryAccess(EarlierInst));
----------------
1. For loads, you don't have to ask for the clobbering access. It's already optimized such that getDefiningAccess == the clobbering access
2. For stores, not sure if you realize this, but
given
store q (lets's call this a)
x = load p
store q (let's call this b)
if you call getClobberingMemoryAccess on b, it will return a.
https://reviews.llvm.org/D19821
More information about the llvm-commits
mailing list