[LLVMdev] Anderson's analysis, getresult instruction on x86_64

Prakash Prabhu prakash.prabhu at gmail.com
Mon Aug 4 21:16:48 PDT 2008


Hi,

I was trying to run Anderson's pointer analysis using opt on a 64 bit x86
system (running Ubuntu 8.04) and it seems that the 'getresult' instruction
is not currently handled. When I run the same analysis on the bitcode got by
compiling (using llvm-gcc on a 32 bit machine) on a 32-bit x86 machine, it
runs fine. I was trying to see if it is possible to quickly add a
'visitGetResultInst' to Andersons.cpp but could not quite find the right
constraint to add to the pointer analysis. Can a instruction like :

%mrv_gr = getresult { i64*, i64* } %74, 0

be modelled as a load/store/getelementpointer and a
Constraint::Load/Store/Copy be added to handle this case ?

Right now though, the opt crash in my case seems to be due to getresult that
does not access pointers (i am guessing from {i64, i64} type though i may be
wrong):

$ opt -anders-aa < 175.vpr.bc >/dev/null
Unknown instruction:    %mrv_gr = getresult { i64, i64 } %74, 0         ;
<i64> [#uses=1]
opt[0xb522ba]
opt[0xb523e4]
/lib/libc.so.6[0x2b4f6da277d0]
/lib/libc.so.6(gsignal+0x35)[0x2b4f6da27765]
/lib/libc.so.6(abort+0x110)[0x2b4f6da291c0]
opt[0x9aab0e]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE18visitGetResultInstERNS_13GetResultInstE+0x1d)[0x9c0a6b]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE14visitGetResultERNS_13GetResultInstE+0x1d)[0x9c0a8b]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_11InstructionE+0x3eb)[0x9c1083]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitINS_14ilist_iteratorINS_11InstructionEEEEEvT_S8_+0x3d)[0x9c10ff]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_10BasicBlockE+0x42)[0x9c1154]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitINS_14ilist_iteratorINS_10BasicBlockEEEEEvT_S8_+0x3d)[0x9c1199]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_8FunctionE+0x42)[0x9c11ee]
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitEPNS_8FunctionE+0x1d)[0x9c1213]
opt[0x9add12]
opt[0x9c1252]
opt(_ZN4llvm13MPPassManager11runOnModuleERNS_6ModuleE+0xee)[0xadf60c]
opt(_ZN4llvm15PassManagerImpl3runERNS_6ModuleE+0x74)[0xadf79e]
opt(_ZN4llvm11PassManager3runERNS_6ModuleE+0x21)[0xadf801]
opt(main+0xb44)[0x7fab36]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2b4f6da13b44]
opt[0x7ebd99]
Aborted (core dumped)

Thanks for any pointers (:)) !

- Prakash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080805/66576854/attachment.html>


More information about the llvm-dev mailing list