diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-01-07 19:53:13 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2017-01-07 19:53:13 +0000 |
commit | ff98fa955b5dc98bb05e30ed79299155d2a2f97c (patch) | |
tree | 2bf26f2a4e197b339a06e6fa3464a559f3ddd2e8 /gcc/doc | |
parent | 42002dfec374c429569796c275001f1b0635e674 (diff) | |
download | gcc-ff98fa955b5dc98bb05e30ed79299155d2a2f97c.zip gcc-ff98fa955b5dc98bb05e30ed79299155d2a2f97c.tar.gz gcc-ff98fa955b5dc98bb05e30ed79299155d2a2f97c.tar.bz2 |
[-fcompare-debug] var tracking options are not optimization options
If we include them in the ICF hash, they may cause congruence_groups to
be processed in a different order due to different hashes, which in turn
causes different funcdef_nos to be assigned to functions. Since these
numbers are included in -fcompare-debug dumps, they cause failures.
Since these options are not optimization options, in that they do not
(or should not, save for bugs like this) affect the executable code
output by the compiler, they should not be marked as such.
This patch replaces the Optimization flag in the var-tracking options
with the newly-introduced PerFunction flag, so that it can still be
controlled on a per-function basis, but that disregards it in the hash
computation used by ICF.
This fixes -fcompare-debug failures in numerous LTO testcases.
for gcc/ChangeLog
* doc/options.texi (PerFunction): New.
* opt-functions.awk (switch_flags): Map both Optimization and
PerFunction to CL_OPTIMIZATION.
* opth-gen.awk: Test for PerFunction flag along with
Optimization.
* optc-save-gen.awk: Likewise. Introduce var_opt_hash and set
it only when the latter is present. Skip those that don't in
the hash function generator.
* common.opt (fvar-tracking): Mark as PerFunction instead of
Optimization.
(fvar-tracking-assignments): Likewise.
(fvar-tracking-assignments-toggle): Likewise.
(fvar-tracking-uninit): Likewise.
From-SVN: r244198
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/options.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi index 5c067f7..3b68aab 100644 --- a/gcc/doc/options.texi +++ b/gcc/doc/options.texi @@ -430,6 +430,13 @@ This is an optimization option. It should be shown as such in @code{Var} should be saved and restored when the optimization level is changed with @code{optimize} attributes. +@item PerFunction +This is an option that can be overridden on a per-function basis. +@code{Optimization} implies @code{PerFunction}, but options that do not +affect executable code generation may use this flag instead, so that the +option is not taken into account in ways that might affect executable +code generation. + @item Undocumented The option is deliberately missing documentation and should not be included in the @option{--help} output. |