GCC Middle and Back End API Reference
loop_data Struct Reference
Collaboration diagram for loop_data:

Data Fields

struct loopoutermost_exit
bool has_call
int max_reg_pressure [N_REG_CLASSES]
bitmap_head regs_ref
bitmap_head regs_live

Detailed Description


RTL-level loop invariant motion. Copyright (C) 2004-2013 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/.

   This implements the loop invariant motion pass.  It is very simple
   (no calls, no loads/stores, etc.).  This should be sufficient to cleanup
   things like address arithmetics -- other more complicated invariants should
   be eliminated on GIMPLE either in tree-ssa-loop-im.c or in tree-ssa-pre.c.

   We proceed loop by loop -- it is simpler than trying to handle things
   globally and should not lose much.  First we inspect all sets inside loop
   and create a dependency graph on insns (saying "to move this insn, you must
   also move the following insns").

   We then need to determine what to move.  We estimate the number of registers
   used and move as many invariants as possible while we still have enough free
   registers.  We prefer the expensive invariants.

   Then we move the selected invariants out of the loop, creating a new
   temporaries for them if necessary.  
   The data stored for the loop.  

Field Documentation

bool loop_data::has_call
int loop_data::max_reg_pressure[N_REG_CLASSES]
     Maximal register pressure inside loop for given register class
     (defined only for the pressure classes).  
struct loop* loop_data::outermost_exit
bitmap_head loop_data::regs_live
bitmap_head loop_data::regs_ref
     Loop regs referenced and live pseudo-registers.  

The documentation for this struct was generated from the following file: