10 #ifndef FIRM_IROPTIMIZE_H
11 #define FIRM_IROPTIMIZE_H
13 #include "firm_types.h"
214 #define osr_flag_default osr_flag_lftr_with_ov_check
289 #define DEFAULT_CLONE_THRESHOLD 20
void opt_ldst(ir_graph *irg)
New experimental alternative to optimize_load_store.
struct ir_type ir_type
Type.
do NOT increase register pressure by introducing new induction variables.
void occult_consts(ir_graph *)
This optimization finds values where the bits are either constant or irrelevant and exchanges them fo...
void do_loop_inversion(ir_graph *irg)
Perform loop inversion on a given graph.
void combo(ir_graph *irg)
CLiff Click's combo algorithm from "Combining Analyses, combining Optimizations". ...
struct ir_graph ir_graph
Procedure Graph.
ir_tarval * computed_value_Cmp_Confirm(ir_node *left, ir_node *right, ir_relation relation)
Returns the value of a Cmp if one or both predecessors are Confirm nodes.
void place_code(ir_graph *irg)
Code Placement.
ir_entity * create_compilerlib_entity(ident *id, ir_type *mt)
Constructs the entity for a given function using the current compilerlib entity creation callback...
void combine_memops(ir_graph *irg)
Combine adjacent "small" load/store operations into bigger ones.
ident *(* compilerlib_name_mangle_t)(ident *id, ir_type *mt)
Type of callbacks for creating entities of the compiler library.
void set_compilerlib_name_mangle(compilerlib_name_mangle_t cb)
Sets the compilerlib entity creation callback that is used to create compilerlib function entities...
void opt_tail_rec_irg(ir_graph *irg)
Optimizes tail-recursion calls by converting them into loops.
void(* opt_ptr)(ir_graph *irg)
pointer to an optimization function
void normalize_n_returns(ir_graph *irg)
Normalize the Returns of a graph by moving the Returns upwards as much as possible.
void opt_frame_irg(ir_graph *irg)
Optimize the frame type of an irg by removing never touched entities.
int(* check_alloc_entity_func)(ir_entity *ent)
A callback that checks whether a entity is an allocation routine.
void opt_parallelize_mem(ir_graph *irg)
Tries to reduce dependencies for memory nodes where possible by parallelizing them and synchronizing ...
osr_flags
Possible flags for the Operator Scalar Replacement.
void normalize_one_return(ir_graph *irg)
Normalize the Returns of a graph by creating a new End block with One Return(Phi).
compilerlib_name_mangle_t get_compilerlib_name_mangle(void)
Returns the compilerlib entity creation callback.
ir_node * can_replace_load_by_const(const ir_node *load, ir_node *c)
Check if we can replace the load by a given const from the const code irg.
do linear function test replacement only if no overflow can occur.
void do_loop_peeling(ir_graph *irg)
Perform loop peeling on a given graph.
void proc_cloning(float threshold)
Performs procedure cloning.
void inline_functions(unsigned maxsize, int inline_threshold, opt_ptr after_inline_opt)
Heuristic inliner.
void optimize_reassociation(ir_graph *irg)
Reassociation.
void opt_if_conv_cb(ir_graph *irg, arch_allow_ifconv_func callback)
Perform If conversion on a graph - callback version.
struct ir_entity ir_entity
Entity.
int(* arch_allow_ifconv_func)(ir_node *sel, ir_node *mux_false, ir_node *mux_true)
This function is called to evaluate, if a mux(sel, mux_false, mux_true) should be built for the curre...
void opt_bool(ir_graph *irg)
Simplifies boolean expression in the given ir graph.
void do_loop_unrolling(ir_graph *irg)
Perform loop unrolling on a given graph.
void opt_jumpthreading(ir_graph *irg)
Perform path-sensitive jump threading on the given graph.
void remove_phi_cycles(ir_graph *irg)
Removes useless Phi cycles, i.e cycles of Phi nodes with only one non-Phi node.
struct ir_tarval ir_tarval
Target Machine Value.
void do_gvn_pre(ir_graph *irg)
Does Partial Redundancy Elimination combined with Global Value Numbering.
void garbage_collect_entities(void)
Removes all entities which are unused.
void shape_blocks(ir_graph *irg)
Combines congruent blocks into one.
ir_relation
Relations for comparing numbers.
void scalar_replacement_opt(ir_graph *irg)
Performs the scalar replacement optimization.
void optimize_cf(ir_graph *irg)
Control flow optimization.
void optimize_funccalls(void)
Optimize function calls by handling const functions.
ignore Multiplications by 2, 4, 8
void optimize_load_store(ir_graph *irg)
Load/Store optimization.
void opt_osr(ir_graph *irg, unsigned flags)
Performs the Operator Scalar Replacement optimization and linear function test replacement for loop c...
struct ir_node ir_node
Procedure Graph Node.
const char ident
Identifier.
int value_not_null(const ir_node *n, const ir_node **confirm)
Returns true if the value n is known not be zero/null.
void conv_opt(ir_graph *irg)
Reduces the number of Conv nodes in the given ir graph.
void dead_node_elimination(ir_graph *irg)
Performs dead node elimination by copying the ir graph to a new obstack.
void opt_if_conv(ir_graph *irg)
Perform If conversion on a graph.