#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. |
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.