becopyopt: Remove the unnecessary attribute name from struct copy_opt_t.
[libfirm] / ir / be / arm / arm_optimize.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Implements several optimizations for ARM.
9  * @author      Michael Beck
10  */
11 #ifndef FIRM_BE_ARM_ARM_OPTIMIZE_H
12 #define FIRM_BE_ARM_ARM_OPTIMIZE_H
13
14 #include "irgraph.h"
15 #include "bearch_arm_t.h"
16
17 typedef struct arm_vals {
18         int ops;
19         unsigned char values[4];
20         unsigned char rors[4];
21 } arm_vals;
22
23 /**
24  * Encodes an immediate with shifter operand
25  */
26 unsigned int arm_encode_imm_w_shift(unsigned int shift, unsigned int immediate);
27
28 /**
29  * Decode an immediate with shifter operand
30  */
31 unsigned int arm_decode_imm_w_shift(long imm_value);
32
33 /**
34  * construct 8bit values and rot amounts for a 32bit value.
35  */
36 void arm_gen_vals_from_word(unsigned int value, arm_vals *result);
37
38 /**
39  * Performs Peephole Optimizations an a graph.
40  *
41  * @param irg   the graph
42  */
43 void arm_peephole_optimization(ir_graph *irg);
44
45 #endif