GCC Middle and Back End API Reference
ipa-modref.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  modref_summary
 

Typedefs

typedef modref_tree< alias_set_typemodref_records
 
typedef unsigned short eaf_flags_t
 

Functions

modref_summaryget_modref_function_summary (cgraph_node *func)
 
modref_summaryget_modref_function_summary (gcall *call, bool *interposed)
 
void ipa_modref_cc_finalize ()
 
void ipa_merge_modref_summary_after_inlining (cgraph_edge *e)
 
int interposable_eaf_flags (int modref_flags, int flags)
 

Variables

static const int implicit_const_eaf_flags
 
static const int implicit_pure_eaf_flags
 
static const int ignore_stores_eaf_flags
 
static const int implicit_retslot_eaf_flags
 

Typedef Documentation

◆ eaf_flags_t

◆ modref_records

Search for references that a functions loads or stores.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.

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

Function Documentation

◆ get_modref_function_summary() [1/2]

◆ get_modref_function_summary() [2/2]

modref_summary * get_modref_function_summary ( gcall * call,
bool * interposed )
Get function summary for CALL if it exists, return NULL otherwise.
If non-null set interposed to indicate whether function may not
bind to current def.  In this case sometimes loads from function
needs to be ignored.   

References symtab_node::binds_to_current_def_p(), cgraph_node::get(), get_modref_function_summary(), ggc_alloc(), gimple_call_fndecl(), NULL, and r.

◆ interposable_eaf_flags()

int interposable_eaf_flags ( int modref_flags,
int flags )
inline
If function does not bind to current def (i.e. it is inline in comdat
section), the modref analysis may not match the behavior of function
which will be later symbol interposed to.  All side effects must match
however it is possible that the other function body contains more loads
which may trap.
MODREF_FLAGS are flags determined by analysis of function body while
FLAGS are flags known otherwise (i.e. by fnspec, pure/const attributes
etc.)   

References EAF_NO_DIRECT_CLOBBER, EAF_NO_DIRECT_ESCAPE, EAF_NO_DIRECT_READ, EAF_NO_INDIRECT_CLOBBER, EAF_NO_INDIRECT_ESCAPE, EAF_NO_INDIRECT_READ, EAF_NOT_RETURNED_DIRECTLY, EAF_NOT_RETURNED_INDIRECTLY, EAF_UNUSED, and ggc_alloc().

Referenced by gimple_call_arg_flags(), and gimple_call_retslot_flags().

◆ ipa_merge_modref_summary_after_inlining()

◆ ipa_modref_cc_finalize()

void ipa_modref_cc_finalize ( )
Summaries must stay alive until end of compilation.   

References ggc_alloc(), ggc_delete(), NULL, optimization_summaries, and summaries_lto.

Referenced by toplev::finalize().

Variable Documentation

◆ ignore_stores_eaf_flags

const int ignore_stores_eaf_flags
static
Initial value:
#define EAF_NO_INDIRECT_ESCAPE
Definition tree-core.h:116
#define EAF_NO_DIRECT_CLOBBER
Definition tree-core.h:111
#define EAF_NO_DIRECT_ESCAPE
Definition tree-core.h:115
#define EAF_NO_INDIRECT_CLOBBER
Definition tree-core.h:112
All flags implied when we know we can ignore stores (i.e. when handling
call to noreturn).   

◆ implicit_const_eaf_flags

const int implicit_const_eaf_flags
static
Initial value:
#define EAF_NO_INDIRECT_READ
Definition tree-core.h:124
#define EAF_NOT_RETURNED_INDIRECTLY
Definition tree-core.h:120
#define EAF_NO_DIRECT_READ
Definition tree-core.h:123
All flags that are implied by the ECF_CONST functions.   

Referenced by find_func_aliases_for_call().

◆ implicit_pure_eaf_flags

const int implicit_pure_eaf_flags
static
Initial value:
All flags that are implied by the ECF_PURE function.   

Referenced by find_func_aliases_for_call().

◆ implicit_retslot_eaf_flags

const int implicit_retslot_eaf_flags
static