X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespillslots.h;h=56d884cd2d83a697feabbb483d58d038b2d2791b;hb=e41f887b6ed60098916f3b66004c237de33d5241;hp=0aa32b52eeb546253a26c5ca80fb1e4db1f6141e;hpb=4d5c3365a58cba59993045a9e08e686d8ae079a7;p=libfirm diff --git a/ir/be/bespillslots.h b/ir/be/bespillslots.h index 0aa32b52e..56d884cd2 100644 --- a/ir/be/bespillslots.h +++ b/ir/be/bespillslots.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -17,23 +17,24 @@ * PURPOSE. */ -/* - * Author: Matthias Braun - * Date: 27.7.2006 - * Copyright: (c) Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. +/** + * @file + * @brief Spillslot coalescer. + * @author Matthias Braun + * @date 27.07.2006 */ -#ifndef BESPILLSLOTS_H_ -#define BESPILLSLOTS_H_ +#ifndef FIRM_BE_BESPILLSLOTS_H +#define FIRM_BE_BESPILLSLOTS_H +#include #include "beirg.h" -typedef struct _be_fec_env_t be_fec_env_t; +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); +be_fec_env_t *be_new_frame_entity_coalescer(ir_graph *irg); /** * Frees a frame entity coalescer environment @@ -53,21 +54,13 @@ void be_free_frame_entity_coalescer(be_fec_env_t *env); void be_node_needs_frame_entity(be_fec_env_t *env, ir_node *node, const ir_mode *mode, int alignment); +typedef void (*set_frame_entity_func)(ir_node *node, ir_entity *entity); + /** * 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 -//------------------------------------------------------------------- - -/** - * 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(be_irg_t *birg); +void be_assign_entities(be_fec_env_t *env, set_frame_entity_func set_frame, + bool alloc_entities_at_begin); -#endif /* BESPILLSLOTS_H_ */ +#endif