X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespillslots.h;h=b75695a97940bda668b8b7c372238a5aeaf4dec3;hb=e243eb2e9e8a9f5e57e166950a1a0a8ab25e92a9;hp=65e8419b7b11383b2125739f1510865faea5fe12;hpb=c5e94f039082de17df10b34a3445c15c0af12f71;p=libfirm diff --git a/ir/be/bespillslots.h b/ir/be/bespillslots.h index 65e8419b7..b75695a97 100644 --- a/ir/be/bespillslots.h +++ b/ir/be/bespillslots.h @@ -9,9 +9,46 @@ #include "bechordal.h" +typedef struct _be_fec_env_t be_fec_env_t; + +/** + * Initializes a new frame entity coalescer environment + */ +be_fec_env_t *be_new_frame_entity_coalescer(be_irg_t *birg); + +/** + * Frees a frame entity coalescer environment + */ +void be_free_frame_entity_coalescer(be_fec_env_t *env); + +/** + * Adds a node that needs a frame entity and consumes memory (Reload nodes). The + * memory edges are followed to find memory-phis and the entities that produce + * the memory values. + * + * @param env The frame entity coalescer environment + * @param node The node that uses the frame entity + * @param mode The mode of the needed spillslot + * @param align The alignment of the needed spillslot + */ +void be_node_needs_frame_entity(be_fec_env_t *env, ir_node *node, + const ir_mode *mode, int alignment); + +/** + * Assigned frame entities to all the nodes added by be_node_needs_frame_entity. + * Adds memory perms where needed. + */ +void be_assign_entities(be_fec_env_t *env); + +//------------------------------------------------------------------- +// Old API +//------------------------------------------------------------------- + /** - * Computes the spill offsets for all spill nodes in the irg + * Assigns frame entities to all spill nodes in the irg. + * Coalesces spillslots and minimizes the number of memcopies induced by + * memory-phis. */ -void be_coalesce_spillslots(const be_chordal_env_t *chordal_env, int coalesce_spillslots); +void be_coalesce_spillslots(const be_chordal_env_t *chordal_env); #endif