GCC Middle and Back End API Reference
tree-ssa-math-opts.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

tree powi_as_mults (gimple_stmt_iterator *, location_t, tree, HOST_WIDE_INT)
bool optimize_widening_mul_active_p (void)

Function Documentation

◆ optimize_widening_mul_active_p()

bool optimize_widening_mul_active_p ( void )
extern
True when pass_optimize_widening_mul will run.  Shared with the
forwprop long-multiply recognizer so its wide-chain emit stays
paired with the lowering that rescues an unsupported 2N shape.
The -Og pipeline (pass_all_optimizations_g) does not contain
pass_optimize_widening_mul at all, so -Og -fexpensive-optimizations
must not enable the emit: the unlowered 2N multiply would reach
expand as an unexpandable mode (e.g. OImode) and ICE.
-fdisable-tree-widening_mul is not observed.   

Referenced by long_mul_classify_match().

◆ powi_as_mults()

tree powi_as_mults ( gimple_stmt_iterator * gsi,
location_t loc,
tree arg0,
HOST_WIDE_INT n )
extern
Global, SSA-based optimizations using mathematical identities.
   Copyright (C) 2021-2026 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/>.   
Convert ARG0**N to a tree of multiplications of ARG0 with itself.
This function needs to be kept in sync with powi_cost above.   

References absu_hwi(), build_one_cst(), build_real(), cache, dconst1, gimple_build_assign(), gimple_set_location(), gsi_insert_before(), GSI_SAME_STMT, make_temp_ssa_name(), NULL, powi_as_mults_1(), POWI_TABLE_SIZE, and TREE_TYPE.

Referenced by attempt_builtin_powi(), and gimple_expand_builtin_powi().