GCC Middle and Back End API Reference
ipa_icf Namespace Reference

Data Structures

class  congruence_class
 
struct  congruence_class_group
 
struct  congruence_class_hash
 
class  pass_ipa_icf
 
class  sem_function
 
class  sem_item
 
class  sem_item_optimizer
 
struct  sem_usage_hash
 
class  sem_usage_pair
 
struct  sem_usage_pair_hash
 
class  sem_variable
 
class  symbol_compare_collection
 
struct  symbol_compare_hash
 
struct  traverse_split_pair
 

Typedefs

typedef hash_map< sem_usage_hash, auto_vec< sem_item * > > ref_map
 
typedef std::pair< symtab_node *, symtab_node * > symtab_pair
 

Enumerations

enum  sem_item_type { FUNC , VAR }
 

Functions

static bool set_local (cgraph_node *node, void *data)
 
static bool set_addressable (varpool_node *node, void *)
 
static bool clear_decl_rtl (symtab_node *node, void *)
 
static int redirect_all_callers (cgraph_node *n, cgraph_node *to)
 
static int sort_sem_items_by_decl_uid (const void *a, const void *b)
 
static int sort_congruence_classes_by_decl_uid (const void *a, const void *b)
 
static int sort_congruence_class_groups_by_decl_uid (const void *a, const void *b)
 
static void set_alias_uids (symtab_node *n, int uid)
 
static void ipa_icf_generate_summary (void)
 
static void ipa_icf_write_summary (void)
 
static void ipa_icf_read_summary (void)
 
static unsigned int ipa_icf_driver (void)
 

Variables

static sem_item_optimizeroptimizer = NULL
 
const pass_data pass_data_ipa_icf
 

Detailed Description

Interprocedural semantic function equality pass
   Copyright (C) 2014-2024 Free Software Foundation, Inc.

   Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

Typedef Documentation

◆ ref_map

◆ symtab_pair

Enumeration Type Documentation

◆ sem_item_type

Semantic item type enum.   
Enumerator
FUNC 
VAR 

Function Documentation

◆ clear_decl_rtl()

static bool ipa_icf::clear_decl_rtl ( symtab_node * node,
void *  )
static
Clear DECL_RTL of NODE. 
Helper for call_for_symbol_thunks_and_aliases.   

References symtab_node::decl, NULL, and SET_DECL_RTL.

Referenced by ipa_icf::sem_function::merge(), and ipa_icf::sem_variable::merge().

◆ ipa_icf_driver()

static unsigned int ipa_icf::ipa_icf_driver ( void )
static
Semantic equality execution function.   

References ipa_icf::sem_item_optimizer::execute(), gcc_assert, NULL, optimizer, and TODO_remove_functions.

Referenced by ipa_icf::pass_ipa_icf::execute().

◆ ipa_icf_generate_summary()

static void ipa_icf::ipa_icf_generate_summary ( void )
static

◆ ipa_icf_read_summary()

static void ipa_icf::ipa_icf_read_summary ( void )
static

◆ ipa_icf_write_summary()

static void ipa_icf::ipa_icf_write_summary ( void )
static
Write pass summary for IPA ICF pass.   

References gcc_assert, optimizer, and ipa_icf::sem_item_optimizer::write_summary().

◆ redirect_all_callers()

◆ set_addressable()

static bool ipa_icf::set_addressable ( varpool_node * node,
void *  )
static
TREE_ADDRESSABLE of NODE to true.
Helper for call_for_symbol_thunks_and_aliases.   

References symtab_node::decl, and TREE_ADDRESSABLE.

Referenced by ipa_icf::sem_variable::merge().

◆ set_alias_uids()

static void ipa_icf::set_alias_uids ( symtab_node * n,
int uid )
static

◆ set_local()

static bool ipa_icf::set_local ( cgraph_node * node,
void * data )
static
Set LOCAL_P of NODE to true if DATA is non-NULL.
Helper for call_for_symbol_thunks_and_aliases.   

References cgraph_node::local, and NULL.

Referenced by ipa_icf::sem_function::merge().

◆ sort_congruence_class_groups_by_decl_uid()

static int ipa_icf::sort_congruence_class_groups_by_decl_uid ( const void * a,
const void * b )
static
Sort pair of congruence_class_groups A and B by
DECL_UID of the first member of a first group.   

References a, b, and ggc_alloc().

Referenced by ipa_icf::sem_item_optimizer::merge_classes().

◆ sort_congruence_classes_by_decl_uid()

static int ipa_icf::sort_congruence_classes_by_decl_uid ( const void * a,
const void * b )
static
Sort pair of congruence_classes A and B by DECL_UID of the first member.   

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

Referenced by ipa_icf::sem_item_optimizer::merge_classes().

◆ sort_sem_items_by_decl_uid()

static int ipa_icf::sort_sem_items_by_decl_uid ( const void * a,
const void * b )
static
Sort pair of sem_items A and B by DECL_UID.   

References a, b, DECL_UID, ggc_alloc(), i1, and i2.

Referenced by ipa_icf::sem_item_optimizer::merge_classes().

Variable Documentation

◆ optimizer

◆ pass_data_ipa_icf

const pass_data ipa_icf::pass_data_ipa_icf
Initial value:
=
{
"icf",
0,
0,
0,
0,
0,
}
@ OPTGROUP_IPA
Definition dumpfile.h:256
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
@ IPA_PASS
Definition tree-pass.h:36