shlysis.cpp File Reference

The sharing analysis of tree t is the annotation of all its subtrees t' with their number of occurences in t. More...

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "shlysis.hh"
#include "compatibility.hh"

Go to the source code of this file.

Functions

Tree shprkey (Tree t)
 Create a specific property key for the sharing count of subtrees of t.
int shcount (Tree key, Tree t)
 Return the value of sharing count or 0.
static void annotate (Tree k, Tree t, barrier foo)
 Recursively increment the occurences count of t and its subtrees.
Tree shlysis (Tree t, barrier foo)
 Do a sharing analysis : annotates all the subtrees of t with there occurences.
Tree shlysis (Tree t)
 Do a sharing analysis : annotates all the subtrees of t with there occurences.


Detailed Description

The sharing analysis of tree t is the annotation of all its subtrees t' with their number of occurences in t.

As this annotation of t' depends of a context (the tree t for which t' is a subtree) a specific property key unique to each sharing analysis must be generated.

Definition in file shlysis.cpp.


Generated on Sun Mar 22 16:14:49 2009 for FAUST compiler by  doxygen 1.5.8