publishing


Subject: publishing
From: Craig Chambers (chambers@cs.washington.edu)
Date: Sun Jul 28 2002 - 13:03:58 PDT


I'm publishing my latest version of Whirlwind. This compiler now
supports inlining, which led to a host of changes to the IR/graph
construction and manipulation infrastructure. I've tested it by
compiling and running my (expanded) test suite and all our Java
benchmarks w/ optimization.

*) I changed how the CFG is built to have returns and raises
 translated into branches to designated labels. These labels either
 lead to real returns & raises, when compiling an out-of-line
 function, or the corresponding CFG successors of the original fn
 call, when compiling an inlined function.

*) I changed how the DFG is built to have argument and result edges be
 passed in/out when building the DFG of an inlined function.

*) I removed the FunExnHandler hierarchy, replacing it with explicit
 handlers for each of the exceptions possibly raised by a function.

*) I changed how FormalDeclNodes work, so that in inlined contexts
 they can have a dataflow predecessor, but otherwise they act as roots
 of the dataflow graph.

*) I augmented FxnCallNodes to store a table of FormalDeclNodes for
 each of the arguments of the exception handlers that the call may
 flow to. These dataflow roots are given dataflow sources when a
 function call is replaced with an inline dataflow graph.

*) I modified the DFG construction so that all nodes are included in
 the DFG, even nodes with no predecessors or successors. Such trivial
 nodes are included so they are candidates for removable by the unused
 value elim pass. (We probably don't need to include
 non-value-producing trivial nodes, though.)

*) Codegen of raises and handlers changed (and got simpler). The role
 of some other codegen routines was clarified.

*) I added dependency tracking for the bodies of functions, so that if
 the body of a function changes, any code that has inlined the
 function will be recompiled.

*) I removed the computing & storing of the tails of a graph slice
(e.g. the CFG or DFG), since it was never used. Then I discovered a
performance problem with backward traversals over graphs, which should
have been starting from the tails but were actually starting from the
roots. I fixed the performance problem by dynamically computing the
tails of a graph each time a backward traversal is needed. If this
(re)computation turns out to be too expensive, we can fix it in a
couple of ways. The best is probably to change the topo numbering
code to work over the forwards graph, even if a backward traversal is
being used, and simply reverse the sense of the numbering to get the
numbers for a backward graph; that may remove the last use of the
tails of a graph.

*) I modified the composed analysis to not visit nodes in the composed
 graph that aren't reachable in a particular component analysis graph.

*) I made explicit distinctions in the code between
 lexically_enclosing_scopes and dynamically_enclosing_scopes.

*) I spruced up some of the dataflow optimizations to optimize in the
 face of trivial pass-through dataflow nodes better.

*) I augmented the unused value elim optimization to remove unused
 variable initializations.

*) I improved the typechecking for Lattice elements, by making them
 parameterized.

*) I added helper print and print_class functions in the Java .wil native
 files to be called during debugging to print out Java objects nicely.
 I modified the Java front-end to generate the necessary class
 meta-data in order to support toString() on java.lang.class objects.

*) In the process of doing this, I found a nasty bug in the parser
 code for nested statement lists, where a local variable was shadowing
 an enclosing variable unintentionally.

*) I discovered some omissions in the rep-checking code, and I fixed
 them.

*) I renamed gf-node to gf-table, to reflect its primary data
 structure and match class-hierarchy better.

-- Craig
_______________________________________________
Cecil mailing list
Cecil@cs.washington.edu
http://majordomo.cs.washington.edu/mailman/listinfo/cecil



This archive was generated by hypermail 2b25 : Sun Jul 28 2002 - 13:02:28 PDT