Displaying 2 results from an estimated 2 matches for "loop_trip_count0".
Did you mean:
loop_trip_count
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
...loopsimplify -f < test.o > n.o
4. I tried to dump the loop trip count by my own pass (cfginst):
opt -load lib/libLLVMCFGInst.so -cfginst < n.o
-----------------------------------------------
But I got the following messages:
Function getV doesn't have loops
Function main has 1 loops
loop_trip_count0 0
could not get the trip count
-------------------------------
My pass looks like:
----------------------------------
virtual bool runOnFunction(Function &F) {
LoopInfo &LI = getAnalysis<LoopInfo>();
CFGInstCounter++;...
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!!
I guess once I am able to get *V* (which probably is a pointer to a
Value object), then, I can instrument some code at the IR level to
dump V. As long as I maintain V at this pass stage, I should be able
to dump the loop trip count. This is true, isn't it?
Basically, what I am going to do is to add a function call before the
loop body, such as: