[LLVMdev] getCanonicalInductionVariable
Malveeka Tewari
mtewari at eng.ucsd.edu
Sat May 21 15:52:16 PDT 2011
Hi
I have the followed code for which I am writing a loop pass.
int main() {
int i = 0;
for (i=0; i<20; i++) {
printf ("hello world %d\n", i);
}
return 0;
}
In the function runOnLoop, I have the following instruction
PHINode *indv = NULL;
indv = L->getCanonicalInductionVariable();
However, when I check indv is always set to NULL.
Since the code has a canonical induction variable, I was expecting the endv
to start pointing to the induction var phi node.
Please let me what I'm missing here
Thanks
Malveeka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110521/b305df61/attachment.html>
More information about the llvm-dev
mailing list