<commit_before>/*
 * Project:     libFIRM
 * File name:   ir/ir/irflag.c
 * Purpose:     Flags to control optimizations.
 * Author:      <NAME>, <NAME>
 * Modified by:
 * Created:
 * CVS-ID:      $Id$
 * Copyright:   (c) 1999-2003 Universitt Karlsruhe
 * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 */

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "firm_common.h"
#include "irflag_t.h"

/* DISABLE - don't do this optimization
   ENABLE  - lets see, if there is a better graph */
#define ENABLE(a)   a
#define DISABLE(a)  0

optimization_state_t libFIRM_opt =
  ENABLE(OPT_OPTIMIZED)                          |
  ENABLE(OPT_CSE)                                |
  DISABLE(OPT_GLOBAL_CSE)                        |
  ENABLE(OPT_LOOP_UNROLLING)                     |
  ENABLE(OPT_STRENGTH_RED)                       |
  ENABLE(OPT_CONSTANT_FOLDING)                   |
  ENABLE(OPT_REDUNDANT_LOADSTORE)                |
  ENABLE(OPT_UNREACHABLE_CODE)                   |
  ENABLE(OPT_CONTROL_FLOW_STRAIGHTENING)         |
  ENABLE(OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION)   |
  ENABLE(OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION) |
  ENABLE(OPT_CRITICAL_EDGES)                     |
  ENABLE(OPT_DEAD_NODE_ELIMINATION)              |
  ENABLE(OPT_DEAD_METHOD_ELIMINATION)            |
  ENABLE(OPT_REASSOCIATION)                      |
  ENABLE(OPT_INLINE)                             |
  ENABLE(OPT_DYN_METH_DISPATCH)                  |
  ENABLE(OPT_NORMALIZE)                          |
  ENABLE(OPT_TAIL_RECURSION)                     |
  ENABLE(OPT_PRECISE_EXC_CONTEXT)                |
  DISABLE(OPT_FRAGILE_OPS)                       |
  0;

optimization_state_t libFIRM_verb =
  DISABLE(OPT_OPTIMIZED)                          |
  DISABLE(OPT_CSE)                                |
  DISABLE(OPT_GLOBAL_CSE)                         |
  DISABLE(OPT_LOOP_UNROLLING)                     |
  DISABLE(OPT_STRENGTH_RED)                       |
  DISABLE(OPT_CONSTANT_FOLDING)                   |
  DISABLE(OPT_REDUNDANT_LOADSTORE)                |
  DISABLE(OPT_UNREACHABLE_CODE)                   |
  DISABLE(OPT_CONTROL_FLOW_STRAIGHTENING)         |
  DISABLE(OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION)   |
  DISABLE(OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION) |
  DISABLE(OPT_CRITICAL_EDGES)                     |
  DISABLE(OPT_DEAD_NODE_ELIMINATION)              |
  DISABLE(OPT_DEAD_METHOD_ELIMINATION)            |
  DISABLE(OPT_REASSOCIATION)                      |
  DISABLE(OPT_INLINE)                             |
  DISABLE(OPT_DYN_METH_DISPATCH)                  |
  DISABLE(OPT_NORMALIZE)                          |
  DISABLE(OPT_TAIL_RECURSION)                     |
  DISABLE(OPT_PRECISE_EXC_CONTEXT)                |
  DISABLE(OPT_FRAGILE_OPS)                       |
  0;

/** The Firm verbosity level */
int firm_verbosity_level;

/* set the flags with set_flagname, get the flag with get_flagname */
void set_opt_cse (int value)
{
  if (value)
    libFIRM_opt |= OPT_CSE;
  else
    libFIRM_opt &= ~OPT_CSE;
}<commit_msg>Added default value for if conversion<commit_after>/*
 * Project:     libFIRM
 * File name:   ir/ir/irflag.c
 * Purpose:     Flags to control optimizations.
 * Author:      <NAME>, <NAME>
 * Modified by:
 * Created:
 * CVS-ID:      $Id$
 * Copyright:   (c) 1999-2003 Universitt Karlsruhe
 * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 */

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "firm_common.h"
#include "irflag_t.h"

/* DISABLE - don't do this optimization
   ENABLE  - lets see, if there is a better graph */
#define ENABLE(a)   a
#define DISABLE(a)  0

optimization_state_t libFIRM_opt =
  ENABLE(OPT_OPTIMIZED)                          |
  ENABLE(OPT_CSE)                                |
  DISABLE(OPT_GLOBAL_CSE)                        |
  ENABLE(OPT_LOOP_UNROLLING)                     |
  ENABLE(OPT_STRENGTH_RED)                       |
  ENABLE(OPT_CONSTANT_FOLDING)                   |
  ENABLE(OPT_REDUNDANT_LOADSTORE)                |
  ENABLE(OPT_UNREACHABLE_CODE)                   |
  ENABLE(OPT_CONTROL_FLOW_STRAIGHTENING)         |
  ENABLE(OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION)   |
  ENABLE(OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION) |
  ENABLE(OPT_CRITICAL_EDGES)                     |
  ENABLE(OPT_DEAD_NODE_ELIMINATION)              |
  ENABLE(OPT_DEAD_METHOD_ELIMINATION)            |
  ENABLE(OPT_REASSOCIATION)                      |
  ENABLE(OPT_INLINE)                             |
  ENABLE(OPT_DYN_METH_DISPATCH)                  |
  ENABLE(OPT_NORMALIZE)                          |
  ENABLE(OPT_TAIL_RECURSION)                     |
  ENABLE(OPT_PRECISE_EXC_CONTEXT)                |
  DISABLE(OPT_FRAGILE_OPS)                       |
  ENABLE(OPT_IF_CONVERSION)                      |
  0;

optimization_state_t libFIRM_verb =
  DISABLE(OPT_OPTIMIZED)                          |
  DISABLE(OPT_CSE)                                |
  DISABLE(OPT_GLOBAL_CSE)                         |
  DISABLE(OPT_LOOP_UNROLLING)                     |
  DISABLE(OPT_STRENGTH_RED)                       |
  DISABLE(OPT_CONSTANT_FOLDING)                   |
  DISABLE(OPT_REDUNDANT_LOADSTORE)                |
  DISABLE(OPT_UNREACHABLE_CODE)                   |
  DISABLE(OPT_CONTROL_FLOW_STRAIGHTENING)         |
  DISABLE(OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION)   |
  DISABLE(OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION) |
  DISABLE(OPT_CRITICAL_EDGES)                     |
  DISABLE(OPT_DEAD_NODE_ELIMINATION)              |
  DISABLE(OPT_DEAD_METHOD_ELIMINATION)            |
  DISABLE(OPT_REASSOCIATION)                      |
  DISABLE(OPT_INLINE)                             |
  DISABLE(OPT_DYN_METH_DISPATCH)                  |
  DISABLE(OPT_NORMALIZE)                          |
  DISABLE(OPT_TAIL_RECURSION)                     |
  DISABLE(OPT_PRECISE_EXC_CONTEXT)                |
  DISABLE(OPT_FRAGILE_OPS)                        |
  DISABLE(OPT_IF_CONVERSION)                      |
  0;

/** The Firm verbosity level */
int firm_verbosity_level;

/* set the flags with set_flagname, get the flag with get_flagname */
void set_opt_cse (int value)
{
  if (value)
    libFIRM_opt |= OPT_CSE;
  else
    libFIRM_opt &= ~OPT_CSE;
}
{'fraction_non_alphanumeric': 0.0726167626359565, 'fraction_numerical': 0.0035188739603326936, 'mean_word_length': 1.7080987440450413, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3546992', 'n_tokens_mistral': 2200, 'n_tokens_neox': 2073, 'n_words': 283}