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
 

Functions

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 )
static
Compare clusters by minimum value.   

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

Referenced by if_chain::is_beneficial().

◆ convert_if_conditions_to_switch()

◆ dump_clusters()

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

References dump_file, dump_flags, ggc_alloc(), i, and TDF_DETAILS.

Referenced by if_chain::is_beneficial().

◆ find_conditions()

◆ label_cmp()

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

References a, b, CASE_LOW, ggc_alloc(), 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)

References ggc_alloc().

◆ range_cmp()

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

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

Referenced by if_chain::check_non_overlapping_cases().