[LLVMdev] RegisterPass isAnalysis parameter

Devang Patel devang.patel at gmail.com
Fri Feb 26 18:03:54 PST 2010


On Thu, Feb 25, 2010 at 5:24 PM, Trevor Harmon <Trevor.W.Harmon at nasa.gov> wrote:
> Hi,
>
> I'm confused about the is_analysis parameter of the RegisterPass
> constructor (defined in PassSupport.h). The only explanation I can
> find is that is_analysis should be set to true if the pass is "an
> analysis pass, for example dominator tree pass". Can someone please
> clarify what is meant by "analysis pass"?

An analysis pass collects information. A transformation/codegen pass
operates on IR. This flag is used by pass manager to decide whether to
run a requested pass again or not. The user may intentionally want to
run a transformation pass multiple times.

For example,
  $ opt -dom-tree -dom-tree -instcombine -instcombine in.bc -o out.bc
runs dominator tree pass only once, but instcombine pass twice.

-
Devang



More information about the llvm-dev mailing list