GCC Middle and Back End API Reference
|
Data Fields | |
tree | var |
tree | result |
int | modified |
@verbatim
Language independent return value optimizations 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 file implements return value optimizations for functions which return aggregate types. Basically this pass searches the function for return statements which return a local aggregate. When converted to RTL such statements will generate a copy from the local aggregate to final return value destination mandated by the target's ABI. That copy can often be avoided by directly constructing the return value into the final destination mandated by the target's ABI. This is basically a generic equivalent to the C++ front-end's Named Return Value optimization.
int nrv_data::modified |
Referenced by finalize_nrv_r().
tree nrv_data::result |
This is the function's RESULT_DECL. We will replace all occurrences of VAR with RESULT_DECL when we apply this optimization.
Referenced by finalize_nrv_r().
tree nrv_data::var |
This is the temporary (a VAR_DECL) which appears in all of this function's RETURN_EXPR statements.