[llvm-commits] [llvm] r110382 - in /llvm/trunk: lib/Analysis/BasicAliasAnalysis.cpp lib/Analysis/MemoryDependenceAnalysis.cpp test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll

Chris Lattner clattner at apple.com
Mon Aug 30 14:32:43 PDT 2010


On Aug 5, 2010, at 3:09 PM, Dan Gohman wrote:

> Author: djg
> Date: Thu Aug  5 17:09:15 2010
> New Revision: 110382
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=110382&view=rev
> Log:
> Fix memdep's code for reasoning about dependences between two calls. A Ref
> response from getModRefInfo is not useful here. Instead, check for identical
> calls only in the NoModRef case.
> 
> Reapply r110270, and strengthen it to compensate for the memdep changes.
> When both calls are readonly, there is no dependence between them.

Hi Dan, if you're changing the semantics of the mod/ref queries here, please update this comment in AliasAnalysis.h:

  /// getModRefInfo - Return information about whether two call sites may refer
  /// to the same set of memory locations.  This function returns NoModRef if
  /// the two calls refer to disjoint memory locations, Ref if CS1 reads memory
  /// written by CS2, Mod if CS1 writes to memory read or written by CS2, or
  /// ModRef if CS1 might read or write memory accessed by CS2.
  ///
  virtual ModRefResult getModRefInfo(ImmutableCallSite CS1,
                                     ImmutableCallSite CS2);

also here:
http://llvm.org/docs/AliasAnalysis.html#ModRefInfo

Note that the call/call modref query should probably return its own (richer) enum than ModRefResult if you're interested in this going forward.

-Chris





More information about the llvm-commits mailing list