GCC Middle and Back End API Reference
|
Data Fields | |
class loop * | max_loop |
class loop * | tgt_loop |
class loop * | always_executed_in |
unsigned | cost |
unsigned | ref |
vec< gimple * > | depends |
Loop invariant motion. Copyright (C) 2003-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/>.
TODO: Support for predicated code motion. I.e. while (1) { if (cond) { a = inv; something; } } Where COND and INV are invariants, but evaluating INV may trap or be invalid from some other reason if !COND. This may be transformed to if (cond) a = inv; while (1) { if (cond) something; }
The auxiliary data kept for each statement.
unsigned lim_aux_data::cost |
Referenced by move_computations_worker().
Referenced by add_dependency(), outermost_invariant_loop(), and set_profitable_level().
unsigned lim_aux_data::ref |
Referenced by determine_max_movement(), execute_sm(), gather_mem_refs_stmt(), ref_always_accessed_p(), and ref_indep_loop_p().