beirg.c 1010 Bytes
Newer Older
Christian Würdig's avatar
Christian Würdig committed
1
2
/*
 * This file is part of libFirm.
3
 * Copyright (C) 2012 University of Karlsruhe.
Christian Würdig's avatar
Christian Würdig committed
4
5
 */

Christian Würdig's avatar
Christian Würdig committed
6
7
8
9
10
/**
 * @file
 * @brief       Backend irg - a ir_graph with additional analysis information.
 * @author      Matthias Braun
 * @date        13.12.2006
11
12
 */
#include "execfreq.h"
13
#include "beirg.h"
Sebastian Hack's avatar
Sebastian Hack committed
14
#include "absgraph.h"
15
#include "belive.h"
16

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
void be_invalidate_live_sets(ir_graph *irg)
{
	be_irg_t *birg = be_birg_from_irg(irg);
	be_liveness_invalidate_sets(birg->lv);
}

void be_invalidate_live_chk(ir_graph *irg)
{
	be_irg_t *birg = be_birg_from_irg(irg);
	be_liveness_invalidate_chk(birg->lv);
}

void be_assure_live_sets(ir_graph *irg)
{
	be_irg_t *birg = be_birg_from_irg(irg);
	be_liveness_compute_sets(birg->lv);
}

void be_assure_live_chk(ir_graph *irg)
{
	be_irg_t *birg = be_birg_from_irg(irg);
	be_liveness_compute_chk(birg->lv);
}

41
void be_free_birg(ir_graph *irg)
42
{
43
	be_irg_t *birg = be_birg_from_irg(irg);
44
45
	be_liveness_free(birg->lv);
	birg->lv = NULL;
46
47

	obstack_free(&birg->obst, NULL);
48
	irg->be_data = NULL;
49
}