[LLVMdev] DS-AA reports erroneous NoModRef

Hans Vandierendonck hvdieren at elis.ugent.be
Fri Oct 9 05:14:51 PDT 2009


Hi,

I am using DataStructureAA.cpp (poolalloc project) for alias analysis  
purposes and have noticed an error in getModRefInfo(). The situation  
is that Mod/Ref info is called with a CallSite and GlobalVariable  
argument, where the global is passed as an argument to the call.  
Furthermore, the callee function does *nothing* with this global but  
to pass it on to another callee function. In the last callee, the  
BottomUp DSNode is the same as the GlobalGraphs' node (very detailed;  
including a link to another DSNode), but in the top function and the  
intermediate callee, the global is not accessed and its DSNode is  
simply "I", without a type.

An error manifests itself in DataStructureAA, as the intermediate  
function's BottomUp DSNode is used to check for Mod/Ref info (using  
the RangeIt, then isModifiedNode() and isReadNode()). But the  
intermediate function's DSNode is simply "I", so no Mod/Ref is  
reported. This is erroneous; the global is Mod&Ref at the call site.

I am not sure whether there is an error in either ds-aa or in  
BottomUpDSA.

I have reduced the program down to a simpler test case. Here the  
intermediate functions have an "IE" node. The error occurs when trying  
to see if @spec_compress() does Mod/Ref @spec_fd1 (NoModRef reported).  
In contrast, ds-aa correctly reports ModRef on the callsite to  
@spec_putc() in @compressStream().

Kind regards,
Hans.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase-dce.ll
Type: application/octet-stream
Size: 6431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091009/e218bac5/attachment.obj>
-------------- next part --------------



--  
-------------------------------------------------------------------------------
  Hans Vandierendonck, PhD, Ghent University, Electronics &  
Information Systems
  E-mail: hans.vandierendonck at UGent.be      http://www.elis.UGent.be/~hvdieren/
-------------------------------------------------------------------------------


More information about the llvm-dev mailing list