Mercurial > hg > CbC > CbC_gcc
diff gcc/doc/optinfo.texi @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/doc/optinfo.texi Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/doc/optinfo.texi Thu Oct 25 07:37:49 2018 +0900 @@ -1,4 +1,4 @@ -@c Copyright (C) 2013-2017 Free Software Foundation, Inc. +@c Copyright (C) 2013-2018 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -168,7 +168,7 @@ @example int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS; -dump_printf_loc (report_flags, locus, +dump_printf_loc (report_flags, insn, "loop turned into non-loop; it never loops.\n"); @end example @@ -181,7 +181,19 @@ Note that the above methods also have variants prefixed with @code{_loc}, such as @code{dump_printf_loc}, which are similar except -they also output the source location information. +they also output the source location information. The @code{_loc} variants +take a @code{const dump_location_t &}. This class can be constructed from +a @code{gimple *} or from a @code{rtx_insn *}, and so callers can pass +a @code{gimple *} or a @code{rtx_insn *} as the @code{_loc} argument. +The @code{dump_location_t} constructor will extract the source location +from the statement or instruction, along with the profile count, and +the location in GCC's own source code (or the plugin) from which the dump +call was emitted. Only the source location is currently used. +There is also a @code{dump_user_location_t} class, capturing the +source location and profile count, but not the dump emission location, +so that locations in the user's code can be passed around. This +can also be constructed from a @code{gimple *} and from a @code{rtx_insn *}, +and it too can be passed as the @code{_loc} argument. @end ftable