[LLVMdev] Problem with MemoryDependenceAnalysis

Devang Patel dpatel at apple.com
Fri Mar 20 10:16:04 PDT 2009


On Mar 20, 2009, at 8:13 AM, Amr Yehia wrote:

> Dear all,
>
> I am having a problem adding a MemoryDependenceAnalysis pass to a  
> Module
> Pass i created, it gives me the following error when i  add
> (Info.addRequired<MemoryDependenceAnalysis>();) it in the
> getAnalysisUsage(AnalysisUsage &Info) function.
>
If MemoryDependenceAnalysis requires any module level analysis then it  
won't work.
>
> adding callgraph pass ... done
> opt: /net/home/yehia/llvm/llvm-2.4/include/llvm/Target/TargetData.h: 
> 114:
> llvm::TargetData::TargetData(): Assertion `0 && "ERROR: Bad TargetData
> ctor used.  " "Tool did not specify a TargetData to use?"' failed.

Can you send entire list of passes you're using on 'opt' command line?
-
Devang
>
>
> adding DependenceFlowGraph_FunctionAnalaysis_Pass ...  
> doneopt[0x75627f]
> /lib64/libc.so.6[0x3880a30070]
> /lib64/libc.so.6(gsignal+0x35)[0x3880a30015]
> /lib64/libc.so.6(abort+0x110)[0x3880a31980]
> /lib64/libc.so.6(__assert_fail+0xf6)[0x3880a29726]
> opt[0x6709bd]
> opt(_ZN4llvm17PMTopLevelManager12schedulePassEPNS_4PassE+0x125) 
> [0x6efa75]
> opt(_ZN4llvm17PMTopLevelManager12schedulePassEPNS_4PassE+0x190) 
> [0x6efae0]
> opt(_ZN4llvm13MPPassManager25addLowerLevelRequiredPassEPNS_4PassES2_ 
> +0xcc)[0x6f1dfc]
> opt(_ZN4llvm13PMDataManager3addEPNS_4PassEb+0x2a7)[0x6f4237]
> opt(main+0x348)[0x485ac8]
> /lib64/libc.so.6(__libc_start_main+0xf4)[0x3880a1d8a4]
> opt(sinh+0x39)[0x47b1f9]
>
>
> i tried a work around by creating another function pass and adding the
> MemoryDependenceAnalysis pass to it (i didn't try to get the  
> analysis).
> it doesn't give errors if i only call the function pass i created  
> alone,
> but if i add this function pass to the module pass it gives the same  
> error.
>
> so here is a brief:
> adding MemoryDependenceAnalysis to a module pass -> fail
> adding MemoryDependenceAnalysis to function pass -> success
> adding a function pass that contains MemoryDependenceAnalysis to a
> module pass -> fail
> adding the same function pass without containing
> MemoryDependenceAnalysis to the module pass -> success
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list