[llvm-commits] building a Dependence Graph

Hal Finkel hfinkel at anl.gov
Wed Oct 17 21:09:59 PDT 2012



----- Original Message -----
> From: "Preston Briggs" <preston.briggs at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Wednesday, October 17, 2012 9:02:46 PM
> Subject: Re: [llvm-commits] building a Dependence Graph
> 
> On Wed, Oct 17, 2012 at 6:47 PM, Hal Finkel < hfinkel at anl.gov >
> wrote:
> 
> 
> 
> 
> ----- Original Message -----
> > From: "Preston Briggs" < preston.briggs at gmail.com >
> > To: llvm-commits at cs.uiuc.edu
> > Sent: Wednesday, October 17, 2012 7:04:20 PM
> > Subject: [llvm-commits] building a Dependence Graph
> > 
> > 
> > Attached is a small patch that begins the definition of a new
> > function pass, DependenceGraph, that will build a dependence graph
> > for an entire function.
> 
> What will time time/space complexity of this be?
> 
> Thanks again,
> Hal
> 
> 
> 
> 
> 
> In the worst case, O(n^2), where n is the number of memory references
> (loads, stores, calls), but that's very pessimistic. I discuss many
> ways to reduce the time/space impact of the dependence graph here .

Sounds good.

> 
> 
> We did something similar for the Tera compiler, 20 years ago, running
> on workstations of the day, and it was practical. Nevertheless, in
> the context of LLVM, I expect it will an expensive analysis, perhaps
> only suitable for certain demanding applications.

Okay, thanks! 

 -Hal

> 
> 
> Preston
> 
> 
> 
> > I'm trying to sneak up on the problem in
> > stages, rather than blatting out one big chunk of code, hoping to
> > make it easier to review.
> > 
> > 
> > This new pass depends on the DependenceAnalysis pass to answer
> > questions about the dependence between pairs of instructions. There
> > are two separate passes because there's a useful separation of
> > concerns. A dependence exists if two conditions are met:
> > 
> > 
> > 1. Two instructions reference the same memory location, and
> > 2. There is a flow of control leading from one instruction to the
> 
> > other.
> > 
> > 
> > DependenceAnalysis attacks the first condition; DependenceGraph
> > attacks the second.
> > 
> > 
> > Someday it may be useful to write a different pass, called
> > something
> > like LoopDependenceGraph, that would build a dependence graph for a
> > single loop nest. Such a pass could still rely on the
> > DependenceAnalysis pass.
> > 
> > 
> > Thanks,
> > Preston
> > 
> > 
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > 
> 
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
> 
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list