#ifndef _CHAINS_H #define _CHAINS_H typedef struct _chain *Chain; /** Returns the first Node in this chain */ Node chain_first(Chain chain) ; /** Returns the Symbol for the temp referred to by this chain */ Symbol chain_symbol(const Chain chain) ; /** Returns the last Node in this chain */ Node chain_last(Chain chain); /** Returns non-zero if the variable is live at the start of this chain */ int chain_livein(const Chain chain); /** Returns non-zero if the variable is live after the end of this chain */ int chain_liveout(const Chain chain); ///** Compares the maximum access depth for this chain */ //int compareDepth(const void* chain1, const void* chain2); /* int chain_getID(Chain chain); */ /** Generates the chains for the basic block b */ ArrayList generateChains(Block b); int chain_allocate(Chain chain, Block b, ArrayList lstack_in, ArrayList lstack_out); int chain_empty(Chain chain); void chain_makelastliveout(Chain chain, Symbol var); #endif