Hi,
I need the Instructions live out, so i will be able to run my pass.
One option that i already discussed is to compute it myself.
Second option, use the LiveValues Pass(include/llvm/Analysis/LiveValues).
This questions are on the LiveValues pass:
Do i need to set the “LiveValues” pass in the PassManager as a prerequisite? if so how do i get the results ?How do i get/use the results of LiveValuse pass in my pass?
Is there documentation in the LLVM site (beside of the comments on the file)?
Can i simply use its public function ?
Thanks.
This questions are on the LiveValues pass:
Do i need to set the "LiveValues" pass in the PassManager as a prerequisite? if so how do i get the results ?
Yes; it's a standard analysis pass. See
http://llvm.org/docs/WritingAnLLVMPass.html
for information about interactions between passes.
How do i get/use the results of LiveValuse pass in my pass?
Is there documentation in the LLVM site (beside of the comments on the file)?
Can i simply use its public function ?
There are Doxygen comments which can be read either in the file itself
or via http://llvm.org/doxygen/
Dan
Hi,
I tried to use the LiveValues pass without success.
I did exactly as you wrote me but no luck for me.
I am getting this error :
[rotem@localhost ~]$ opt -load /home/rotem/Desktop/install/Release/lib/BBPass.so -BBPass < /home/rotem/Desktop/tmp/BBtry.bc > /dev/null
Error opening ‘/home/rotem/Desktop/install/Release/lib/BBPass.so’: /home/rotem/Desktop/install/Release/lib/BBPass.so: undefined symbol: _ZN4llvm10LiveValues2IDE
-load request ignored.
opt: Unknown command line argument ‘-BBPass’. Try: ‘opt --help’
I tried also to relocate the LiveValues to the same directory of me pass. This is the error:
llvm[0]: Compiling BBPass.cpp for Release build (PIC)
llvm[0]: Compiling LiveValues.cpp for Release build (PIC)
LiveValues.cpp: In member function ‘llvm::LiveValues::Memo& llvm::LiveValues::compute(const llvm::Value*)’:
LiveValues.cpp:150: error: ‘const class llvm::PHINode’ has no member named ‘getIncomingValueNumForOperand’
I really need your help here
Thank you.
You are apparently mixing source between different versions of LLVM.
Dan