<div dir="ltr">Hi,<br><br>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 :<br>
<br>%mrv_gr = getresult { i64*, i64* } %74, 0<br><br>be modelled as a load/store/getelementpointer and a Constraint::Load/Store/Copy be added to handle this case ?<br><br>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):<br>
<br>$ opt -anders-aa < 175.vpr.bc >/dev/null<br>Unknown instruction:    %mrv_gr = getresult { i64, i64 } %74, 0         ; <i64> [#uses=1]<br>opt[0xb522ba]<br>opt[0xb523e4]<br>/lib/libc.so.6[0x2b4f6da277d0]<br>
/lib/libc.so.6(gsignal+0x35)[0x2b4f6da27765]<br>/lib/libc.so.6(abort+0x110)[0x2b4f6da291c0]<br>opt[0x9aab0e]<br>opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE18visitGetResultInstERNS_13GetResultInstE+0x1d)[0x9c0a6b]<br>
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE14visitGetResultERNS_13GetResultInstE+0x1d)[0x9c0a8b]<br>opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_11InstructionE+0x3eb)[0x9c1083]<br>
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitINS_14ilist_iteratorINS_11InstructionEEEEEvT_S8_+0x3d)[0x9c10ff]<br>opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_10BasicBlockE+0x42)[0x9c1154]<br>
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitINS_14ilist_iteratorINS_10BasicBlockEEEEEvT_S8_+0x3d)[0x9c1199]<br>opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitERNS_8FunctionE+0x42)[0x9c11ee]<br>
opt(_ZN4llvm11InstVisitorIN83_GLOBAL__N__home_pprabhu_llvm_llvm_lib_Analysis_IPA_Andersens.cpp_00000000_1E0AD01D9AndersensEvE5visitEPNS_8FunctionE+0x1d)[0x9c1213]<br>opt[0x9add12]<br>opt[0x9c1252]<br>opt(_ZN4llvm13MPPassManager11runOnModuleERNS_6ModuleE+0xee)[0xadf60c]<br>
opt(_ZN4llvm15PassManagerImpl3runERNS_6ModuleE+0x74)[0xadf79e]<br>opt(_ZN4llvm11PassManager3runERNS_6ModuleE+0x21)[0xadf801]<br>opt(main+0xb44)[0x7fab36]<br>/lib/libc.so.6(__libc_start_main+0xf4)[0x2b4f6da13b44]<br>opt[0x7ebd99]<br>
Aborted (core dumped)<br><br>Thanks for any pointers (:)) !<br><br>- Prakash<br></div>