Hi, Devang Patel wrote:> LLVM loop transformer operates at loop level, which is not what many > optimizers do in general. So, a loop level interface (i.e. based on > LoopPass in llvm) to find loop-carried dependence is preferable to > loop optimizer.Do you mean making Array Dependence Analysis a loop-level analysis? Would its results be available for some function-level pass then? Wojtek
On Mar 18, 2008, at 8:03 AM, Wojciech Matyjewicz wrote:> Hi, > > Devang Patel wrote: >> LLVM loop transformer operates at loop level, which is not what many >> optimizers do in general. So, a loop level interface (i.e. based on >> LoopPass in llvm) to find loop-carried dependence is preferable to >> loop optimizer. > > Do you mean making Array Dependence Analysis a loop-level analysis? > Would its results be available for some function-level pass then?We could extend pass manager framework to let function-level pass use loop-level analysis info. However that is not ideal. A loop level pass operates on a loop only. If a function level pass needs array dependence analysis info then it expects info. to cover entire function. Which means, it will need function level array dependence analysis pass, which is natural. If loop level pass, say LP, is interested in array dependence info, then in many cases it is more interested in loop-carried dependence info for a given loop. If such info. is made available to through a loop level pass then it'd allow loop pass manager to execute allow loop pass manager to handle LP together with other loop passes. - Devang
On Tue, 18 Mar 2008, Devang Patel wrote:>> Do you mean making Array Dependence Analysis a loop-level analysis? >> Would its results be available for some function-level pass then? > > We could extend pass manager framework to let function-level pass use > loop-level analysis info. However that is not ideal.I agree. I think the dependence analysis pass should be a FunctionPass. LoopPasses can use function passes, but not visaversa. -Chris -- http://nondot.org/sabre/ http://llvm.org/
I would not assume that a loop xform would mainly be interested in loop-*carried* dependencies. Some need loop-independent deps also, and some may even need deps outside loops. So making array dep analysis a function pass seems best. --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.org ...... Original Message ....... On Tue, 18 Mar 2008 11:03:31 -0500 "Devang Patel" <dpatel at apple.com> wrote:> >On Mar 18, 2008, at 8:03 AM, Wojciech Matyjewicz wrote: > >> Hi, >> >> Devang Patel wrote: >>> LLVM loop transformer operates at loop level, which is not what many >>> optimizers do in general. So, a loop level interface (i.e. based on >>> LoopPass in llvm) to find loop-carried dependence is preferable to >>> loop optimizer. >> >> Do you mean making Array Dependence Analysis a loop-level analysis? >> Would its results be available for some function-level pass then? > >We could extend pass manager framework to let function-level pass use >loop-level analysis info. However that is not ideal. > >A loop level pass operates on a loop only. If a function level pass >needs array dependence analysis info then it expects info. to cover >entire function. Which means, it will need function level array >dependence analysis pass, which is natural. If loop level pass, say >LP, is interested in array dependence info, then in many cases it is >more interested in loop-carried dependence info for a given loop. If >such info. is made available to through a loop level pass then it'd >allow loop pass manager to execute allow loop pass manager to handle >LP together with other loop passes. > >- >Devang >_______________________________________________ >LLVM Developers mailing list >LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev