Man page for nsharlit.1
Table of Contents


sharlit, nsharlit - generate data-flow analyzers


sharlit [ options ] infile


Sharlit and nsharlit take descriptions of data-flow analyzers and generate C++ classes to perform data-flow analysis. Sharlit uses old SUIF libraries and is used by oynk to implement its optimization analysis phases, while nsharlit uses new SUIF libraries and is used by moo to implement its scalar privatization analysis.

Sharlit and nsharlit generate two files: solver.h and solver.c. These files contain the definitions for classes that implement the data-flow analyzer, the flow functions and flow values.

Sharlit supports a style of optimization based on a model by Kildall, in which each phase consists of a data-flow analysis (DFA) of the program and an optimization function that transforms the program. To support the model, a set of abstractions --- flow values, flow functions, path simplification rules, action routines --- is provided. Sharlit turns a DFA specifiation consisting of these abstractions into a solver for a DFA problem. At the heart of Sharlit is an algorithm called path simplification, an extension of Tarjan's fast path algorithm. Path simplification unifies several powerful DFA solution techniques. By using path simplfication rules, compiler writers can construct a wide range of data-flow analyzers, from simple iterative ones, to solvers that use local analysis, interval analysis, or sparse data-flow evaluation.

For more information, consult the literature listed below.


-L This causes Sharlit to generate #line directives for debugging purposes.

-T causes Sharlit to used a switch-based technique to apply path reduction rules in place of a parsing-based technique. The latter technique is no longer recommended, although some of the older phases of oynk still use it.


oynk(1), moo(1)
S. Tjiang and J. Hennessy. Sharlit: A tool for building optimizers. In SIGPLAN Conference on Programming Language Design and Implementation, 1992, pp 82-93.
S. Tjiang. Automatic Generation of Data-flow Analyzers: A tool for building optimizers Ph.D. Thesis, Stanford University, July 1993.


Sharlit needs to be rewritten so that it uses a notation more amenable to incorporation into C++.


Sharlit and nsharlit were written by Steve Tjiang.

Table of Contents