arm_optimize.h 719 Bytes
Newer Older
1
2
/*
 * This file is part of libFirm.
3
 * Copyright (C) 2012 University of Karlsruhe.
4
5
6
7
8
9
10
11
12
13
 */

/**
 * @file
 * @brief       Implements several optimizations for ARM.
 * @author      Michael Beck
 */
#ifndef FIRM_BE_ARM_ARM_OPTIMIZE_H
#define FIRM_BE_ARM_ARM_OPTIMIZE_H

14
#include "firm_types.h"
15
16

/**
Matthias Braun's avatar
Matthias Braun committed
17
18
19
 * Performs Peephole Optimizations an a graph.
 *
 * @param irg   the graph
20
 */
Matthias Braun's avatar
Matthias Braun committed
21
void arm_peephole_optimization(ir_graph *irg);
22

Matthias Braun's avatar
Matthias Braun committed
23
24
25
26
27
typedef struct arm_vals {
	unsigned ops;
	uint8_t values[4];
	uint8_t rors[4];
} arm_vals;
28
29
30
31

/**
 * construct 8bit values and rot amounts for a 32bit value.
 */
Matthias Braun's avatar
Matthias Braun committed
32
void arm_gen_vals_from_word(uint32_t value, arm_vals *result);
33

34
bool arm_is_valid_offset(int32_t v, ir_mode *mode, bool is_store);
35

36
#endif