bera.h 796 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
 */

6
/**
Christian Würdig's avatar
Christian Würdig committed
7
8
9
10
 * @file
 * @brief       Base routines for register allocation.
 * @author      Sebastian Hack
 * @date        13.01.2005
11
 */
Christian Würdig's avatar
Christian Würdig committed
12
13
#ifndef FIRM_BE_BERA_H
#define FIRM_BE_BERA_H
Sebastian Hack's avatar
Sebastian Hack committed
14

15
#include "firm_types.h"
Sebastian Hack's avatar
Sebastian Hack committed
16

17
typedef struct be_ra_t {
18
	void (*allocate)(ir_graph *irg);   /**< allocate registers on a graph */
Sebastian Hack's avatar
Sebastian Hack committed
19
} be_ra_t;
20

21
22
23
24
25
void be_register_allocator(const char *name, be_ra_t *allocator);

/**
 * Do register allocation with currently selected register allocator
 */
26
void be_allocate_registers(ir_graph *irg);
Sebastian Hack's avatar
Sebastian Hack committed
27

28
29
30
31
32
33
/**
 * Adds additional copies in cases where special register constraints make them
 * unavailable and therefore increase the actual register pressure.
 */
void be_add_missing_copies(ir_graph *irg);

34
#endif