/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
#ifndef FIRM_BE_BELIVE_H
#define FIRM_BE_BELIVE_H
-#include <stdio.h>
-
#include "be_types.h"
-
-#include "firm_types.h"
-#include "pset.h"
-
-#include "irlivechk.h"
-#include "bearch.h"
#include "irnodeset.h"
typedef enum {
- be_lv_state_in = 1,
- be_lv_state_end = 2,
- be_lv_state_out = 4,
+ be_lv_state_none = 0,
+ be_lv_state_in = 1,
+ be_lv_state_end = 2,
+ be_lv_state_out = 4,
} be_lv_state_t;
+ENUM_BITSET(be_lv_state_t)
/**
* Compute the inter block liveness for a graph.
*/
void be_liveness_introduce(be_lv_t *lv, ir_node *irn);
-/**
- * Add all nodes which are missing in the current liveness data.
- * The liveness data of the already existing nodes (in the liveness data) is not touched.
- * @param The liveness info.
- */
-void be_liveness_add_missing(be_lv_t *lv);
-
/**
* Check, if a node is live in at a block.
* @param block The block.
const ir_node *bl, ir_nodeset_t *nodeset);
/**
- * Compute a set of nodes which are live at another node.
- * BEWARE: This is the liveness immediately after the node,
- * so the node itself is alive but its operands maybe not.
+ * Compute a set of nodes which are live just before the given node.
* @param cls The register class to consider.
* @param pos The node.
* @param live The set to put them into.
*/
-void be_liveness_nodes_live_at(const be_lv_t *lv,
- const arch_register_class_t *cls,
- const ir_node *pos, ir_nodeset_t *live);
+void be_liveness_nodes_live_before(be_lv_t const *lv, arch_register_class_t const *cls, ir_node const *pos, ir_nodeset_t *live);
#endif