Store motion via Lazy Code Motion on the reverse CFG.
Copyright (C) 1997-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/>.
This pass implements downward store motion.
As of May 1, 2009, the pass is not enabled by default on any target,
but bootstrap completes on ia64 and x86_64 with the pass enabled.
TODO:
- remove_reachable_equiv_notes is an incomprehensible pile of goo and
a compile time hog that needs a rewrite (maybe cache st_exprs to
invalidate REG_EQUAL/REG_EQUIV notes for?).
- pattern_regs in st_expr should be a regset (on its own obstack).
- store_motion_mems should be a vec instead of a list.
- there should be an alloc pool for struct st_expr objects.
- investigate whether it is helpful to make the address of an st_expr
a cselib VALUE.
- when GIMPLE alias information is exported, the effectiveness of this
pass should be re-evaluated.
This is a list of store expressions (MEMs). The structure is used
as an expression table to track stores which look interesting, and
might be moveable towards the exit block.