[PATCH] D28137: [Devirtualization] MemDep returns non-local !invariant.group dependencies

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 10:40:43 PST 2017


dberlin added inline comments.


================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:340
+  // Non-local invariant group dependency indicates there is non local Def,
+  // which is better than local clobber and everything else.
+  if (InvariantGroupDependency.isNonLocal())
----------------
Prazek wrote:
> dberlin wrote:
> > Err, doesn't it simply indicate there *may* be a non-local def because it hit the top of the block?
> > (that's what it indicates for everything else)
> > How does it indicate there *must* be one?
> > 
> Because this is what getInvariantGroupPointerDependency is doing and what documentation says.
> 
> "
>    Returns Unknown if it does not
>   /// find anything, and Def if it can be assumed that 2 instructions load or
>   /// store the same value and NonLocal which indicate that non-local Def was
>   /// found, which can be retrieved by calling getNonLocalPointerDependency
>   /// with the same queried instruction.
> "
Right, i'm suggesting that this is different than all the other local pointer dependency getters, and thus , confusing

    /// This marker indicates that the query has no dependency in the specified
    /// block.
    ///
    /// To find out more, the client should query other predecessor blocks.
    NonLocal = 1,




https://reviews.llvm.org/D28137





More information about the llvm-commits mailing list