GCC Middle and Back End API Reference
gimple-if-to-switch.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-dfa.h"
#include "tree-cfgcleanup.h"
#include "alias.h"
#include "tree-ssa-loop.h"
#include "diagnostic.h"
#include "cfghooks.h"
#include "tree-into-ssa.h"
#include "cfganal.h"
#include "dbgcnt.h"
#include "target.h"
#include "alloc-pool.h"
#include "tree-switch-conversion.h"
#include "tree-ssa-reassoc.h"
#include "tree-ssa.h"
Include dependency graph for gimple-if-to-switch.cc:

Data Structures

struct  condition_info
struct  if_chain


static int range_cmp (const void *a, const void *b)
static int cluster_cmp (const void *a, const void *b)
static void dump_clusters (vec< cluster * > *clusters, const char *message)
static tree build_case_label (tree index_type, tree min, tree max, basic_block dest)
static int label_cmp (const void *a, const void *b)
static void convert_if_conditions_to_switch (if_chain *chain)
static void find_conditions (basic_block bb, hash_map< basic_block, condition_info * > *conditions_in_bbs)
gimple_opt_passmake_pass_if_to_switch (gcc::context *ctxt)

Function Documentation

◆ build_case_label()

◆ cluster_cmp()

static int cluster_cmp ( const void * a,
const void * b )

◆ convert_if_conditions_to_switch()

◆ dump_clusters()

static void dump_clusters ( vec< cluster * > * clusters,
const char * message )
Dump constructed CLUSTERS with prefix MESSAGE.   

References dump_file, dump_flags, i, and TDF_DETAILS.

Referenced by if_chain::is_beneficial().

◆ find_conditions()

◆ label_cmp()

static int label_cmp ( const void * a,
const void * b )
Compare two integer constants.   

References a, b, CASE_LOW, and tree_int_cst_compare().

Referenced by convert_if_conditions_to_switch().

◆ make_pass_if_to_switch()

gimple_opt_pass * make_pass_if_to_switch ( gcc::context * ctxt)

◆ range_cmp()

static int range_cmp ( const void * a,
const void * b )
Compare two case ranges by minimum value.   

References a, b, range_entry::low, and tree_int_cst_compare().

Referenced by if_chain::check_non_overlapping_cases().