<commit_before>/*
 * Project:     libFIRM
 * File name:   ir/ir/irgopt.h
 * Purpose:     Optimizations for a whole ir graph, i.e., a procedure.
 * Author:      <NAME>, <NAME>
 * Modified by: <NAME>
 * Created:
 * CVS-ID:      $Id$
 * Copyright:   (c) 1998-2003 Universitt Karlsruhe
 * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 */

/**
 * @file irgopt.h
 *
 * Optimizations for a whole ir graph, i.e., a procedure.
 *
 * @author <NAME>, <NAME>
 */

# ifndef _IRGOPT_H_
# define _IRGOPT_H_

# include "irgraph.h"

/** Applies local optimizations (see iropt.h) to all nodes reachable from node n.
 *
 * @param n The node to be optimized.
 */
void local_optimize_node(ir_node *n);

/** Applies local optimizations (see iropt.h) to all nodes in the graph.
 *
 * @param irg  The graph to be optimized.
 *
 * After appliying local_optimize_graph() to a IR-graph, Bad nodes
 * only occure as predecessor of Block and Phi nodes.
 */
void local_optimize_graph (ir_graph *irg);

/** Performs dead node elimination by copying the ir graph to a new obstack.
 *
 *  The major intention of this pass is to free memory occupied by
 *  dead nodes and outdated analyses information.  Further this
 *  function removes Bad predecesors from Blocks and the corresponding
 *  inputs to Phi nodes.  This opens optmization potential for other
 *  optimizations.  Further this phase reduces dead Block<->Jmp
 *  self-cycles to Bad nodes.
 *
 *  Dead_node_elimination is only performed if options `optimize' and
 *  `opt_dead_node_elimination' are set.  The graph may
 *  not be in state phase_building.  The outs datasturcture is freed,
 *  the outs state set to outs_none.  Backedge information is conserved.
 *  Removes old attributes of nodes.  Sets link field to NULL.
 *  Callee information must be freed (irg_callee_info_none).
 *
 *  Attention: the numbers assigned to nodes if the library is compiled for
 *  development/debugging are not conserved by copying.
 *<commit_msg>typo fixed reoved old (and meanwhile wrong) comment<commit_after>/*
 * Project:     libFIRM
 * File name:   ir/ir/irgopt.h
 * Purpose:     Optimizations for a whole ir graph, i.e., a procedure.
 * Author:      <NAME>, <NAME>
 * Modified by: <NAME>
 * Created:
 * CVS-ID:      $Id$
 * Copyright:   (c) 1998-2003 Universitt Karlsruhe
 * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 */

/**
 * @file irgopt.h
 *
 * Optimizations for a whole ir graph, i.e., a procedure.
 *
 * @author <NAME>, <NAME>
 */

# ifndef _IRGOPT_H_
# define _IRGOPT_H_

# include "irgraph.h"

/** Applies local optimizations (see iropt.h) to all nodes reachable from node n.
 *
 * @param n The node to be optimized.
 */
void local_optimize_node(ir_node *n);

/** Applies local optimizations (see iropt.h) to all nodes in the graph.
 *
 * @param irg  The graph to be optimized.
 *
 * After applying local_optimize_graph() to a IR-graph, Bad nodes
 * only occure as predecessor of Block and Phi nodes.
 */
void local_optimize_graph (ir_graph *irg);

/** Performs dead node elimination by copying the ir graph to a new obstack.
 *
 *  The major intention of this pass is to free memory occupied by
 *  dead nodes and outdated analyses information.  Further this
 *  function removes Bad predecesors from Blocks and the corresponding
 *  inputs to Phi nodes.  This opens optmization potential for other
 *  optimizations.  Further this phase reduces dead Block<->Jmp
 *  self-cycles to Bad nodes.
 *
 *  Dead_node_elimination is only performed if options `optimize' and
 *  `opt_dead_node_elimination' are set.  The graph may
 *  not be in state phase_building.  The outs datasturcture is freed,
 *  the outs state set to outs_none.  Backedge information is conserved.
 *  Removes old attributes of nodes.  Sets link field to NULL.
 *  Callee information must be freed (irg_callee_info_none).
 *
{'fraction_non_alphanumeric': 0.08457968024755029, 'fraction_numerical': 0.0041258380608561115, 'mean_word_length': 3.4280821917808217, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2794940', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1209, 'n_words': 493}