GCC Middle and Back End API Reference
varpool.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "tree.h"
#include "gimple.h"
#include "timevar.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include "varasm.h"
#include "debug.h"
#include "output.h"
#include "omp-offload.h"
#include "context.h"
#include "stringpool.h"
#include "attribs.h"
#include "tree-pass.h"
Include dependency graph for varpool.cc:

Data Structures

struct  varpool_node_hook_list
 

Functions

tree ctor_for_folding (tree decl)
 
static void enqueue_node (varpool_node *node, varpool_node **first)
 

Variables

const char *const tls_model_names []
 

Function Documentation

◆ ctor_for_folding()

tree ctor_for_folding ( tree decl)
If DECLARATION is constant variable and its initial value is known
(so we can do constant folding), return its constructor (DECL_INITIAL).
This may be an expression or NULL when DECL is initialized to 0.
Return ERROR_MARK_NODE otherwise.

In LTO this may actually trigger reading the constructor from disk.
For this reason varpool_ctor_useable_for_folding_p should be used when
the actual constructor value is not needed.   

References symtab_node::alias, symtab_node::analyzed, cfun, varpool_node::ctor_useable_for_folding_p(), symtab_node::decl, DECL_EXTERNAL, DECL_IN_CONSTANT_POOL, DECL_INITIAL, DECL_VIRTUAL_P, error_mark_node, gcc_assert, varpool_node::get(), varpool_node::get_alias_target(), ggc_alloc(), PROP_gimple, PROP_rtl, symtab_node::transparent_alias, TREE_CODE, TREE_PUBLIC, TREE_READONLY, TREE_SIDE_EFFECTS, TREE_STATIC, TREE_THIS_VOLATILE, varpool_node::ultimate_alias_target(), and VAR_P.

Referenced by constant_after_peeling(), constant_byte_string(), strlen_pass::count_nonzero_bytes(), expand_expr_real_1(), fully_constant_vn_reference_p(), get_base_constructor(), get_symbol_constant_value(), gimple_get_virt_method_for_vtable(), optimize_count_trailing_zeroes(), param_change_prob(), and symbol_table::remove_unreachable_nodes().

◆ enqueue_node()

static void enqueue_node ( varpool_node * node,
varpool_node ** first )
static
Add NODE to queue starting at FIRST. 
The queue is linked via AUX pointers and terminated by pointer to 1.   

References symtab_node::aux, and gcc_checking_assert.

Variable Documentation

◆ tls_model_names

const char* const tls_model_names[]
Initial value:
={"none", "emulated",
"global-dynamic", "local-dynamic",
"initial-exec", "local-exec"}
Callgraph handling code.
   Copyright (C) 2003-2024 Free Software Foundation, Inc.
   Contributed by Jan Hubicka

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/>.   

Referenced by varpool_node::dump(), and print_node().