[LLVMbugs] [Bug 2253] New: getTripCount() of a Loop does not seem to give the correct trip count
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Apr 26 11:45:16 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2253
Summary: getTripCount() of a Loop does not seem to give the
correct trip count
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: prakash.prabhu at gmail.com
CC: llvmbugs at cs.uiuc.edu
Hi,
I am trying to add a new loop pass in which I making a call to get the trip
count of the loop using
Value *TripCountValue = L->getTripCount()
However I am always getting NULL for TripCountValue (confirmed through gdb). I
am running this pass after the canonicalization of induction variables:
opt --debug-pass=Structure -stats -indvars -loop-rotate -my-loop-pass < main.bc
> main.unroll.s
Pass Arguments: -domtree -loops -scalar-evolution -loopsimplify -domfrontier
-scalar-evolution -lcssa -indvars -loop-rotate -domfrontier -scalar-evolution
-lcssa -my-loop-pass -preverify -domtree -verify
Target Data Layout
ModulePass Manager
FunctionPass Manager
Dominator Tree Construction
Natural Loop Construction
Scalar Evolution Analysis
-- Scalar Evolution Analysis
Canonicalize natural loops
Dominance Frontier Construction
Scalar Evolution Analysis
Loop Pass Manager
Loop-Closed SSA Form Pass
Canonicalize Induction Variables
-- Canonicalize Induction Variables
Rotate Loops
-- Loop-Closed SSA Form Pass
-- Rotate Loops
-- Dominance Frontier Construction
-- Scalar Evolution Analysis
Dominance Frontier Construction
Scalar Evolution Analysis
Loop Pass Manager
Loop-Closed SSA Form Pass
<My Loop Pass>
-- <My Loop Pass>
-- Loop-Closed SSA Form Pass
-- Natural Loop Construction
-- Canonicalize natural loops
-- Dominance Frontier Construction
-- Dominator Tree Construction
-- Scalar Evolution Analysis
Preliminary module verification
Dominator Tree Construction
Module Verifier
-- Preliminary module verification
-- Dominator Tree Construction
-- Module Verifier
Bitcode Writer
-- Bitcode Writer
I have two loops in my source program which have statically-determinable
bounds:
for (i=1; i < 99999; i++)
{
....
}
Is there anything else I should be doing before invoking the getTripCount()
method ?
thanks,
Prakash
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list