summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-07 19:53:13 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-07 19:53:13 +0000
commit05d8c5f8ca3f9dfec96146a6adc2fafda536c121 (patch)
tree2bf26f2a4e197b339a06e6fa3464a559f3ddd2e8 /libcpp
parent38fdd07a879d083dbf5573867cfd8e474b30cc6f (diff)
downloadgcc-05d8c5f8ca3f9dfec96146a6adc2fafda536c121.tar.gz
[-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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244198 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions