[LLVMdev] Induction Variables vs Loop Control Variable

Chris Lattner sabre at nondot.org
Tue Feb 5 10:09:25 PST 2008


On Tue, 5 Feb 2008, Prabhat Kumar Saraswat wrote:
>     I was wondering if its possible to identify loop control
> variables from the induction variables in a Loop using LLVM.
> Also, How does one can use the LoopInfo class to identify the natural
> loops from the IR. In other words how to use the class in the pass?

I'd strongly suggest looking at some existing loop pass like LICM or loop 
strength reduction or induction variable simplification.  Induction 
Variable Simplification specifically will show you how to rely on it and 
how to identifier induction variables.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list