[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 17:17:25 PDT 2010


On Aug 30, 2010, at 4:49 PM, Dan Gohman wrote:

> 
> On Aug 30, 2010, at 2:32 PM, Chris Lattner wrote:
> 
>> 
>> 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
> 
> My intent was to make the code follow what appeared to be the intent
> of the documentation, not to change the intent. I've committed r112557
> to clarify the documentation.

Thanks!

>> Note that the call/call modref query should probably return its own (richer) enum than ModRefResult if you're interested in this going forward.
> 
> Yep. It's not an immediate priority for me though.

Yep, I'm just admitting to a crappy and confusing api :-)

-Chris



More information about the llvm-commits mailing list