GCC Middle and Back End API Reference
|
Data Fields | |
int | total |
int | total_phis |
int | removed |
int | removed_phis |
Dead code elimination pass for the GNU compiler. Copyright (C) 2002-2013 Free Software Foundation, Inc. Contributed by Ben Elliston bje@r and Andrew MacLeod edha t.comamacl Adapted to use control dependence by Steven Bosscher, SUSE Labs. eod@ redha t.co m
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/. Dead code elimination.
References:
Building an Optimizing Compiler, Robert Morgan, Butterworth-Heinemann, 1998, Section 8.9.
Advanced Compiler Design and Implementation, Steven Muchnick, Morgan Kaufmann, 1997, Section 18.10.
Dead-code elimination is the removal of statements which have no impact on the program's output. "Dead statements" have no impact on the program's output, while "necessary statements" may have impact on the output.
The algorithm consists of three phases:
int stmt_stats::removed |
int stmt_stats::removed_phis |
int stmt_stats::total |
int stmt_stats::total_phis |