2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Implements several optimizations for ARM.
11 #ifndef FIRM_BE_ARM_ARM_OPTIMIZE_H
12 #define FIRM_BE_ARM_ARM_OPTIMIZE_H
15 #include "bearch_arm_t.h"
17 typedef struct arm_vals {
19 unsigned char values[4];
20 unsigned char rors[4];
24 * Encodes an immediate with shifter operand
26 unsigned int arm_encode_imm_w_shift(unsigned int shift, unsigned int immediate);
29 * Decode an immediate with shifter operand
31 unsigned int arm_decode_imm_w_shift(long imm_value);
34 * construct 8bit values and rot amounts for a 32bit value.
36 void arm_gen_vals_from_word(unsigned int value, arm_vals *result);
39 * Performs Peephole Optimizations an a graph.
41 * @param irg the graph
43 void arm_peephole_optimization(ir_graph *irg);