[PATCH] D40375: Use MemorySSA in LICM to do sinking and hoisting.
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 17:32:21 PST 2017
>
>
> ================
> Comment at: lib/Transforms/Scalar/LICM.cpp:1650
> + // if the Source is a combination of liveOnEntry and
> + // volatile loads (treated as Defs), it's not invalidated.
> + SmallPtrSet<MemoryAccess *, 4> Processed;
> ----------------
> This seems fishy -- if `volatile` loads do not invalidate pointers then
> why are they treated as defs by MSSA?
>
> We've gone back and forth on this as to whether volatile loads should be
defs or not.
We don't represent ordering chains separately from memory chains.
" // The isOrdered check is used to ensure that volatiles end up as defs
// (atomics end up as ModRef right now anyway). Until we separate the
// ordering chain from the memory chain, this enables people to see at
least
// some relative ordering to volatiles. Note that
getClobberingMemoryAccess
// will still give an answer that bypasses other volatile loads. TODO:
// Separate memory aliasing and ordering into two different chains so
that we
// can precisely represent both "what memory will this read/write/is
clobbered
// by" and "what instructions can I move this past". "
bool Def = bool(ModRef & MRI_Mod) || isOrdered(I);
bool Use = bool(ModRef & MRI_Ref);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171219/1ef5afff/attachment.html>
More information about the llvm-commits
mailing list