gcc/gcc
Roger Sayle e742722f76 PR target/32803: Add -Oz option for improved clang compatibility.
This patch adds support for an -Oz command line option, aggressively
optimizing for size at the expense of performance.  GCC's current -Os
provides a reasonable balance of size and performance, whereas -Oz is
probably only useful for code size benchmarks such as CSiBE.  Or so I
thought until I read in https://news.ycombinator.com/item?id=25408853
that clang's -Oz sometimes outperforms -O[23s]; I suspect modern instruction
decode stages can treat "pushq $1; popq %rax" as a short uop encoding.

Instead of introducing a new global variable, this patch simply abuses
the existing optimize_size by setting its value to 2.  The only change
in behaviour is the tweak to the i386 backend implementing the suggestion
in PR target/32803 to use a short push/pop sequence for loading small
immediate values (-128..127) on x86, matching the behaviour of LLVM.

On x86_64, the simple function:
int foo() { return 25; }

currently generates with -Os:
foo:    movl    $25, %eax       // 5 bytes
        ret

With the proposed -Oz, it generates:
foo:    pushq   $25             // 2 bytes
        popq    %rax            // 1 byte
        ret

On CSiBE, this results in a 0.94% improvement (3703513 bytes total
down to 3668516 bytes).

2021-12-18  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
	PR target/32803
	* common.opt (Oz): New command line option.
	* doc/invoke.texi: Document the new -Oz option.
	* lto-wrapper.c (merge_and_complain, append_compiler_options):
	Treat OPT_Oz as synonymous with OPT_Os.
	* optc-save-gen.awk: Increase maximum value of optimize_size to 2.
	* opts.c (default_options_optimization) [OPT_Oz]: Handle OPT_Oz
	just like OPT_Os, except set opt->x_optimize_size to 2.
	(common_handle_option): Skip OPT_Oz just like OPT_Os.

	* config/i386/i386.md (*movdi_internal): Use a push/pop sequence
	for suitable SImode TYPE_IMOV moves when optimize_size > 1.
	(*movsi_internal): Likewise.

gcc/testsuite/ChangeLog
	PR target/32803
	* gcc.target/i386/pr32803.c: New test case.
2021-12-18 13:47:52 +00:00
..
ada Daily bump. 2021-12-10 00:16:29 +00:00
analyzer Daily bump. 2021-12-13 00:16:28 +00:00
c Daily bump. 2021-12-18 00:16:23 +00:00
c-family Daily bump. 2021-12-18 00:16:23 +00:00
common RISC-V: Add implied defines of Zk, Zkn and Zks 2021-12-04 00:10:35 +08:00
config PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
cp Daily bump. 2021-12-18 00:16:23 +00:00
d Daily bump. 2021-12-16 00:16:28 +00:00
doc PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
fortran Daily bump. 2021-12-15 00:16:28 +00:00
ginclude [PATCH] stddef.h: add support for musl typedef macro guards 2021-12-14 18:08:50 -05:00
go Daily bump. 2021-11-30 00:16:44 +00:00
jit Daily bump. 2021-12-15 00:16:28 +00:00
lto Daily bump. 2021-11-19 00:16:34 +00:00
objc Daily bump. 2021-12-06 00:16:21 +00:00
objcp Daily bump. 2021-11-30 00:16:44 +00:00
po Daily bump. 2021-12-01 00:17:04 +00:00
rtl-ssa
testsuite PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
adjust-alignment.c
alias.c
alias.h
align.h
alloc-pool.c
alloc-pool.h
array-traits.h
asan.c
asan.h
attr-fnspec.h Remember fnspec based EAF flags in modref summary. 2021-11-13 15:20:00 +01:00
attribs.c attribs: Fix wrong error with -Wno-attribute=A::b [PR103649] 2021-12-17 17:56:26 -05:00
attribs.h attribs: Fix wrong error with -Wno-attribute=A::b [PR103649] 2021-12-17 17:56:26 -05:00
auto-inc-dec.c
auto-profile.c Improve AutoFDO count propagation algorithm 2021-12-06 16:59:31 -08:00
auto-profile.h
backend.h
BASE-VER
basic-block.h
bb-reorder.c
bb-reorder.h
bitmap.c Make sbitmap bitmap_set_bit and bitmap_clear_bit return changed state 2021-11-03 11:14:22 +01:00
bitmap.h Make sbitmap bitmap_set_bit and bitmap_clear_bit return changed state 2021-11-03 11:14:22 +01:00
btfout.c
builtin-attrs.def
builtin-types.def openmp: Honor OpenMP 5.1 num_teams lower bound 2021-11-12 12:41:22 +01:00
builtins.c __builtin_dynamic_object_size: Recognize builtin 2021-12-17 09:34:44 +05:30
builtins.def __builtin_dynamic_object_size: Recognize builtin 2021-12-17 09:34:44 +05:30
builtins.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
caller-save.c
calls.c calls.c: Remove some dead code and target hooks 2021-10-20 21:02:52 +01:00
calls.h
ccmp.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
ccmp.h
cfg-flags.def
cfg.c
cfg.h
cfganal.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
cfganal.h Apply TLC to control dependence compute 2021-11-11 09:19:49 +01:00
cfgbuild.c
cfgbuild.h
cfgcleanup.c Introduce REG_SET_EMPTY_P 2021-11-25 14:23:44 +01:00
cfgcleanup.h
cfgexpand.c Remove never looping loop in label_rtx_for_bb 2021-11-25 14:23:44 +01:00
cfgexpand.h
cfghooks.c Improve -fprofile-report 2021-11-28 19:25:33 +01:00
cfghooks.h Improve -fprofile-report 2021-11-28 19:25:33 +01:00
cfgloop.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
cfgloop.h
cfgloopanal.c
cfgloopmanip.c Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
cfgloopmanip.h Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
cfgrtl.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
cfgrtl.h
cgraph.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraph.h Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraphbuild.c
cgraphclones.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraphunit.c Remove dead code and function 2021-11-25 14:23:44 +01:00
ChangeLog Daily bump. 2021-12-18 00:16:23 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def
collect-utils.c
collect-utils.h
collect2-aix.c
collect2-aix.h
collect2.c collect2: Fix missing cleanups. 2021-10-13 17:06:36 +01:00
collect2.h
color-macros.h
combine-stack-adj.c
combine.c Try placing RTL folded constants in the constant pool. 2021-10-18 12:18:00 +01:00
common.md
common.opt PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
compare-elim.c
conditions.h
config.build
config.gcc Darwin: Future-proof and homogeneize detection of darwin versions 2021-12-18 09:20:49 +01:00
config.host Darwin, aarch64 : Initial support for the self-host driver. 2021-11-05 20:52:42 +00:00
config.in configure, Darwin: Check ld64 support for -platform-version. 2021-11-15 19:35:10 +00:00
configure Darwin: Future-proof and homogeneize detection of darwin versions 2021-12-18 09:20:49 +01:00
configure.ac Darwin: Future-proof and homogeneize detection of darwin versions 2021-12-18 09:20:49 +01:00
context.c
context.h
convert.c
convert.h
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
coretypes.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
coroutine-builtins.def
coroutine-passes.cc
coverage.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c cse: Make sure duplicate elements are not entered into the equivalence set [PR103404] 2021-12-06 10:16:22 +00:00
cselib.c
cselib.h
cstamp-h.in
ctfc.c
ctfc.h ctfc: remove redundant comma in enumerator list 2021-10-13 10:05:18 -07:00
ctfout.c
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2021-12-18 00:16:23 +00:00
dbgcnt.c Remove unused but set variables. 2021-10-18 10:16:46 +02:00
dbgcnt.def Fix bug in ipa-pure-const and add debug counters 2021-11-14 00:48:32 +01:00
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS 2021-10-15 09:34:07 +02:00
DEV-PHASE
df-core.c
df-problems.c
df-scan.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic-event-id.h
diagnostic-format-json.cc diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
diagnostic-metadata.h
diagnostic-path.h
diagnostic-show-locus.c diagnostic: fix unused variable 'def_tabstop' [PR103129] 2021-11-11 12:12:53 -05:00
diagnostic-spec.c Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map' 2021-11-15 17:57:54 +01:00
diagnostic-spec.h Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map' 2021-11-15 17:57:54 +01:00
diagnostic-url.h
diagnostic.c diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
diagnostic.def
diagnostic.h diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
digraph.cc
digraph.h
dojump.c
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c
dump-context.h
dumpfile.c Remove TDF_THREADING flag in favor of param. 2021-11-09 14:29:22 +01:00
dumpfile.h Remove TDF_THREADING flag in favor of param. 2021-11-09 14:29:22 +01:00
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c dwarf2cfi: Improve cfa_reg comparisons [PR103619] 2021-12-15 10:43:44 +01:00
dwarf2ctf.c dwarf2ctf: fix typo in comment 2021-10-13 09:58:46 -07:00
dwarf2ctf.h
dwarf2out.c dwarf: Multi-register CFI address support. 2021-12-08 09:47:16 +00:00
dwarf2out.h dwarf: Multi-register CFI address support. 2021-12-08 09:47:16 +00:00
early-remat.c
edit-context.c
edit-context.h
emit-rtl.c
emit-rtl.h
errors.c
errors.h
escaped_string.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c
explow.h
expmed.c gcc/expmed.c: Ensure vector modes are tieable before extraction 2021-11-04 14:51:09 +00:00
expmed.h genmodes: Define NUM_MODE_* macros 2021-11-08 10:36:25 +00:00
expr.c [PR103302] skip multi-word pre-move clobber during lra 2021-12-08 23:37:14 -03:00
expr.h
fibonacci_heap.c
fibonacci_heap.h
file-find.c
file-find.h
file-prefix-map.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
file-prefix-map.h Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
final.c
fixed-value.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
fixed-value.h
flag-types.h Remove TDF_THREADING flag in favor of param. 2021-11-09 14:29:22 +01:00
flags.h
fold-const-call.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
fold-const-call.h
fold-const.c c++: constexpr, fold, weak redecl, fp/0 [PR103310] 2021-12-01 13:24:36 -05:00
fold-const.h c++: constexpr, fold, weak redecl, fp/0 [PR103310] 2021-12-01 13:24:36 -05:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function-abi.cc
function-abi.h
function-tests.c Apply TLC to control dependence compute 2021-11-11 09:19:49 +01:00
function.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
function.h Keep x_range_query NULL for global ranges. 2021-11-09 13:27:42 -05:00
fwprop.c
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-rich-location.c
gcc-rich-location.h
gcc-symtab.h
gcc.c For -foffload= suggest also 'disable' and 'default' [PR103644] 2021-12-16 11:19:37 +01:00
gcc.h
gcov-counter.def
gcov-dump.c gcov: make profile merging smarter 2021-10-13 15:26:58 +02:00
gcov-io.c
gcov-io.h
gcov-tool.c
gcov.c gcov: Remove dead variable. 2021-11-03 14:30:01 +01:00
gcse-common.c
gcse-common.h
gcse.c
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencfn-macros.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c Fix clang -Wcast-qual warning. 2021-11-09 09:46:09 +01:00
genconfig.c
genconstants.c
genemit.c
genenums.c
generic-match-head.c
generic-match.h
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
gengtype.c pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
gengtype.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
genhooks.c
genmatch.c
genmddeps.c
genmddump.c
genmodes.c genmodes: Define NUM_MODE_* macros 2021-11-08 10:36:25 +00:00
genmultilib
genopinit.c vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
gentarget-def.c
genversion.c
ggc-common.c pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-tests.c pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
ggc.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
gimple-array-bounds.cc Avoid pathological function redeclarations when checking access sizes [PR102759]. 2021-11-17 15:09:23 -07:00
gimple-array-bounds.h Make full use of context-sensitive ranges in access warnings. 2021-10-26 16:53:23 -06:00
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c tree-object-size: Use trees and support negative offsets 2021-12-17 09:15:30 +05:30
gimple-fold.h openmp: Avoid calling clear_type_padding_in_mask in the common case where there can't be any padding 2021-10-12 09:37:25 +02:00
gimple-harden-conditionals.cc [PR103024,PR103530] support throwing compares and non-boolean types 2021-12-08 23:37:09 -03:00
gimple-if-to-switch.cc
gimple-isel.cc
gimple-iterator.c Add GSI_LAST_NEW_STMT iterator update 2021-10-13 15:12:43 +02:00
gimple-iterator.h Add GSI_LAST_NEW_STMT iterator update 2021-10-13 15:12:43 +02:00
gimple-laddress.c
gimple-loop-interchange.cc
gimple-loop-jam.c tree-optimization/103361 - fix unroll-and-jam direction vector handling 2021-11-23 11:04:34 +01:00
gimple-loop-versioning.cc
gimple-low.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
gimple-low.h
gimple-match-head.c Canonicalize argument order for commutative functions 2021-11-30 09:52:25 +00:00
gimple-match.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
gimple-predicate-analysis.cc Restore can_be_invalidated_p semantics to before refactoring 2021-11-29 09:20:09 +01:00
gimple-predicate-analysis.h
gimple-predict.h
gimple-pretty-print.c
gimple-pretty-print.h
gimple-range-cache.cc Use dominators to reduce cache-flling. 2021-12-06 13:27:10 -05:00
gimple-range-cache.h Use dominators to reduce cache-flling. 2021-12-06 13:27:10 -05:00
gimple-range-edge.cc ranger: Add shortcuts for single-successor blocks 2021-12-06 18:29:31 +00:00
gimple-range-edge.h
gimple-range-fold.cc Always track arguments, even when ignoring equiv params. 2021-11-30 09:07:21 -05:00
gimple-range-fold.h Ranger : Do not process abnormal ssa-names. 2021-10-15 12:00:41 -04:00
gimple-range-gori.cc ranger: Add shortcuts for single-successor blocks 2021-12-06 18:29:31 +00:00
gimple-range-gori.h Add BB option for outgoing_edge_range_p and may_reocmpute_p. 2021-12-06 13:14:53 -05:00
gimple-range-path.cc path solver: Use only one ssa_global_cache. 2021-12-01 17:11:12 +01:00
gimple-range-path.h path solver: Use only one ssa_global_cache. 2021-12-01 17:11:12 +01:00
gimple-range-tests.cc
gimple-range-trace.cc
gimple-range-trace.h
gimple-range.cc Also pre-process PHIs in range-of-stmt. 2021-12-01 09:10:41 -05:00
gimple-range.h Directly resolve range_of_stmt dependencies. 2021-11-24 09:03:07 -05:00
gimple-ssa-backprop.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
gimple-ssa-evrp-analyze.c
gimple-ssa-evrp-analyze.h
gimple-ssa-evrp.c Split --param=evrp-mode into evrp-mode and ranger-debug. 2021-10-21 09:28:23 -04:00
gimple-ssa-isolate-paths.c
gimple-ssa-nonnull-compare.c
gimple-ssa-split-paths.c
gimple-ssa-sprintf.c Improve/correct detection of overlapping aggregates [PR102238, PR102919]. 2021-10-26 16:53:54 -06:00
gimple-ssa-store-merging.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
gimple-ssa-strength-reduction.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
gimple-ssa-warn-access.cc Avoid expecting nonzero size for access none void* arguments [PR101751]. 2021-12-09 11:28:43 -07:00
gimple-ssa-warn-access.h Make full use of context-sensitive ranges in access warnings. 2021-10-26 16:53:23 -06:00
gimple-ssa-warn-alloca.c
gimple-ssa-warn-restrict.c Pass GIMPLE statement to compute_objsize. 2021-12-09 09:51:47 -07:00
gimple-ssa-warn-restrict.h
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c
gimple-walk.h
gimple-warn-recursion.c Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
gimple.c Remember fnspec based EAF flags in modref summary. 2021-11-13 15:20:00 +01:00
gimple.def
gimple.h vect: Use generalised accessors to build SLP nodes 2021-11-30 09:52:28 +00:00
gimplify-me.c
gimplify-me.h
gimplify.c OpenMP 5.0: Remove array section base-pointer mapping semantics and other front-end adjustments 2021-12-09 00:01:10 +08:00
gimplify.h
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-dependences.c
graphite-isl-ast-to-gimple.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
graphite-optimize-isl.c
graphite-poly.c
graphite-scop-detection.c
graphite-sese-to-poly.c
graphite.c
graphite.h
graphviz.cc
graphviz.h
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c
hard-reg-set.h
hash-map-tests.c
hash-map-traits.h
hash-map.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
hash-set-tests.c
hash-set.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
hash-table.c
hash-table.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
hash-traits.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
hosthooks.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c [PR103028] test ifcvt trap_if seq more strictly after reload 2021-12-04 00:17:16 -03:00
ifcvt.h
inchash.c
inchash.h
incpath.c
incpath.h
init-regs.c
input.c diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
input.h Generalize 'gcc/input.h:struct location_hash' 2021-11-09 14:40:12 +01:00
insn-addr.h
insn-notes.def
int-vector-builder.h
internal-fn.c middle-end/103271 - avoid VLA init of register 2021-12-02 13:35:19 +01:00
internal-fn.def vect: Add support for fmax and fmin reductions 2021-11-30 09:52:25 +00:00
internal-fn.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
intl.c
intl.h
ipa-comdats.c
ipa-cp.c Remove forgotten early return in ipa_value_range_from_jfunc 2021-11-25 23:58:48 +01:00
ipa-devirt.c
ipa-fnsummary.c Do not ICE on ternary expressions when calculating value ranges 2021-12-13 09:38:53 +01:00
ipa-fnsummary.h Rename predicate class to ipa_predicate 2021-11-03 14:00:46 +01:00
ipa-free-lang-data.cc
ipa-icf-gimple.c
ipa-icf-gimple.h
ipa-icf.c
ipa-icf.h
ipa-inline-analysis.c
ipa-inline-transform.c
ipa-inline.c inline: fix ICE with -fprofile-generate 2021-12-13 14:58:34 +01:00
ipa-inline.h
ipa-modref-tree.c Determine global memory accesses in ipa-modref 2021-12-14 16:50:27 +01:00
ipa-modref-tree.h Determine global memory accesses in ipa-modref 2021-12-14 16:50:27 +01:00
ipa-modref.c Determine global memory accesses in ipa-modref 2021-12-14 16:50:27 +01:00
ipa-modref.h tree-optimization/103168 - Improve VN of pure function calls 2021-11-24 12:40:36 +01:00
ipa-param-manipulation.c ipa-param-manip: Be careful about a reallocating hash_map 2021-11-30 15:35:47 +01:00
ipa-param-manipulation.h ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227) 2021-11-25 18:16:31 +01:00
ipa-polymorphic-call.c
ipa-predicate.c Rename predicate class to ipa_predicate 2021-11-03 14:00:46 +01:00
ipa-predicate.h Rename predicate class to ipa_predicate 2021-11-03 14:00:46 +01:00
ipa-profile.c Avoid updating hot bb threshold in call speculation code 2021-12-11 20:45:02 +01:00
ipa-prop.c ipa: Fix CFG fix-up in IPA-CP transform phase (PR 103441) 2021-11-27 01:01:46 +01:00
ipa-prop.h ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227) 2021-11-25 18:16:31 +01:00
ipa-pure-const.c Terminate BB analysis on NULL memory access in ipa-pure-const and ipa-modref 2021-12-12 11:38:13 +01:00
ipa-ref.c
ipa-ref.h
ipa-reference.c
ipa-reference.h
ipa-split.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
ipa-sra.c ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls 2021-11-30 18:45:21 +01:00
ipa-utils.c
ipa-utils.h Enable pure-const discovery in modref. 2021-11-11 18:14:45 +01:00
ipa-visibility.c
ipa.c IPA: Provide a mechanism to register static DTORs via cxa_atexit. 2021-11-15 19:48:56 +00:00
ira-build.c
ira-color.c [PR103437] Make backup code for overflow conditional 2021-12-02 12:39:05 -05:00
ira-conflicts.c
ira-costs.c [PR99531] Modify pseudo class cost calculation when processing move involving the pseudo and a hard register 2021-12-13 14:10:03 -05:00
ira-emit.c
ira-int.h
ira-lives.c
ira.c
ira.h
is-a.h
iterator-utils.h
json.cc
json.h
jump.c
langhooks-def.h Add a simulate_record_decl lang hook 2021-11-02 10:51:23 +00:00
langhooks.c Add a simulate_record_decl lang hook 2021-11-02 10:51:23 +00:00
langhooks.h c++: improve print_node of PTRMEM_CST 2021-11-16 10:20:30 -05:00
LANGUAGES
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
loop-invariant.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
loop-iv.c
loop-unroll.c Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
loop-unroll.h
lower-subreg.c gcc/lower_subreg.c: Prevent decomposition if modes are not tieable 2021-11-04 14:55:44 +00:00
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c [PR102842] Consider all outputs in generation of matching reloads 2021-10-26 15:17:29 -04:00
lra-eliminations.c
lra-int.h
lra-lives.c
lra-remat.c
lra-spills.c
lra.c
lra.h
lto-cgraph.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
lto-compress.c Remove unused but set variables. 2021-10-18 10:16:46 +02:00
lto-compress.h
lto-opts.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
lto-section-in.c
lto-section-names.h
lto-section-out.c
lto-streamer-in.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
lto-streamer-out.c
lto-streamer.c
lto-streamer.h
lto-wrapper.c PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
machmode.def
machmode.h pch: Small cleanup 2021-12-13 09:51:17 +01:00
main.c
Makefile.in Replace gnu::unique_ptr with std::unique_ptr 2021-12-12 22:51:12 +00:00
match.pd Final value replacement improvements for until-wrap loops. 2021-12-01 19:58:40 +00:00
mcf.c
mem-stats-traits.h
mem-stats.h
memmodel.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c
multiple_target.c
mux-utils.h
obstack-utils.h
omp-builtins.def openmp: Honor OpenMP 5.1 num_teams lower bound 2021-11-12 12:41:22 +01:00
omp-expand.c openmp: Regimplify operands of GIMPLE_COND in a few more places [PR103208] 2021-11-16 10:19:22 +01:00
omp-expand.h
omp-general.c openmp: Fix up handling of kind(host) and kind(nohost) in ACCEL_COMPILERs [PR103384] 2021-11-24 10:30:32 +01:00
omp-general.h Make OpenACC orphan gang reductions errors 2021-11-30 12:58:45 +01:00
omp-low.c openmp: Improve OpenMP target support for C++ (PR92120) 2021-12-08 22:29:06 +08:00
omp-low.h
omp-oacc-kernels-decompose.cc
omp-oacc-neuter-broadcast.cc
omp-offload.c [OpenACC] Remove erroneous "Orphan reductions cannot have gang partitioning" handling 2021-11-30 12:59:14 +01:00
omp-offload.h
omp-simd-clone.c Introduce build_debug_expr_decl 2021-11-09 17:54:28 +01:00
omp-simd-clone.h
ONEWS
opt-functions.awk Fix --help -Q output 2021-12-07 14:37:02 +01:00
opt-gather.awk
opt-include.awk
opt-problem.cc
opt-problem.h
opt-read.awk
opt-suggestions.c
opt-suggestions.h
optabs-libfuncs.c
optabs-libfuncs.h
optabs-query.c vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
optabs-query.h vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
optabs-tree.c
optabs-tree.h
optabs.c
optabs.def vect: Add support for fmax and fmin reductions 2021-11-30 09:52:25 +00:00
optabs.h
optc-gen.awk Fix negative integer range for UInteger. 2021-11-01 20:29:19 +01:00
optc-save-gen.awk PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
opth-gen.awk
optinfo-emit-json.cc
optinfo-emit-json.h
optinfo.cc
optinfo.h
opts-common.c Fix --help -Q output 2021-12-07 14:37:02 +01:00
opts-diagnostic.h
opts-global.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
opts.c PR target/32803: Add -Oz option for improved clang compatibility. 2021-12-18 13:47:52 +00:00
opts.h Fix --help -Q output 2021-12-07 14:37:02 +01:00
ordered-hash-map-tests.cc
ordered-hash-map.h
output.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
params.opt param: Add missing . in description. 2021-12-10 13:31:21 +01:00
pass_manager.h
passes.c Improve -fprofile-report 2021-11-28 19:25:33 +01:00
passes.def Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
plugin.c
plugin.def
plugin.h attribs: Implement -Wno-attributes=vendor::attr [PR101940] 2021-11-10 09:17:13 -05:00
pointer-query.cc Extend the offset and size of merged object references [PR103215]. 2021-12-09 12:51:40 -07:00
pointer-query.h Add a new dump function. 2021-12-09 09:51:48 -07:00
poly-int-types.h
poly-int.h pch: Small cleanup 2021-12-13 09:51:17 +01:00
postreload-gcse.c
postreload.c
predict.c Fix hash_map::traverse overload 2021-12-07 13:11:47 +01:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl-function.c
print-rtl.c Define m_rtx_reuse_manager only if not GENERATOR_FILE. 2021-11-09 14:45:51 +01:00
print-rtl.h Define m_rtx_reuse_manager only if not GENERATOR_FILE. 2021-11-09 14:45:51 +01:00
print-tree.c c++: improve print_node of PTRMEM_CST 2021-11-16 10:20:30 -05:00
print-tree.h
profile-count.c Use -fopt-info in unswitch pass. 2021-12-08 19:20:15 +01:00
profile-count.h Use -fopt-info in unswitch pass. 2021-12-08 19:20:15 +01:00
profile.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
profile.h
range-op.cc Remove can_throw_non_call_exceptions special case from operator_div::wi_fold. 2021-11-30 11:23:27 +01:00
range-op.h
range.cc
range.h
read-md.c
read-md.h
read-rtl-function.c Fix RTL FE issue with premature return 2021-11-29 16:18:45 +01:00
read-rtl-function.h
read-rtl.c Fix RTL frontend handling of const_vectors 2021-11-04 08:28:44 +00:00
README.Portability
real.c
real.h genmodes: Define NUM_MODE_* macros 2021-11-08 10:36:25 +00:00
realmpfr.c
realmpfr.h
recog.c
recog.h
ree.c middle-end: REE should always check all vector usages, even if it finds a defining def. [PR103350] 2021-12-15 10:26:10 +00:00
reg-notes.def
reg-stack.c [PR103097] tolerate reg-stack cross-block malformed asms 2021-12-08 23:37:15 -03:00
regcprop.c
regcprop.h
reginfo.c
regrename.c regrename: Skip renaming if instruction is noop move. 2021-12-14 16:55:57 -05:00
regrename.h
regs.h
regset.h Introduce REG_SET_EMPTY_P 2021-11-25 14:23:44 +01:00
regstat.c
reload.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
reload.h
reload1.c
reorg.c
resource.c
resource.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl-ssa.h
rtl-tests.c
rtl.c
rtl.def
rtl.h simplify-rtx: Punt on simplify_associative_operation with large operands [PR102356] 2021-12-01 10:16:57 +01:00
rtlanal.c
rtlanal.h
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
rtx-vector-builder.c
rtx-vector-builder.h
run-rtl-passes.c
run-rtl-passes.h
sancov.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h Make sbitmap bitmap_set_bit and bitmap_clear_bit return changed state 2021-11-03 11:14:22 +01:00
sched-deps.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
sched-ebb.c
sched-int.h
sched-rgn.c
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
sel-sched-ir.h Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
sel-sched.c
sel-sched.h
selftest-diagnostic.c
selftest-diagnostic.h
selftest-rtl.c
selftest-rtl.h
selftest-run-tests.c Replace gnu::unique_ptr with std::unique_ptr 2021-12-12 22:51:12 +00:00
selftest.c diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
selftest.h Replace gnu::unique_ptr with std::unique_ptr 2021-12-12 22:51:12 +00:00
sese.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
sese.h
shortest-paths.h
shrink-wrap.c
shrink-wrap.h
signop.h
simplify-rtx.c simplify-rtx: Punt on simplify_associative_operation with large operands [PR102356] 2021-12-01 10:16:57 +01:00
sort.cc
sparseset.c
sparseset.h
spellcheck-tree.c
spellcheck-tree.h
spellcheck.c
spellcheck.h
splay-tree-utils.cc
splay-tree-utils.h
splay-tree-utils.tcc
sreal.c
sreal.h
ssa-iterators.h Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
ssa.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c
stmt.h
stor-layout.c
stor-layout.h
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
stringpool.h
substring-locations.c
substring-locations.h
symbol-summary.h
symtab-clones.cc
symtab-clones.h
symtab-thunks.cc
symtab-thunks.h
symtab.c symtab: fix comment typo 2021-12-10 14:45:23 -05:00
sync-builtins.def
system.h Replace gnu::unique_ptr with std::unique_ptr 2021-12-12 22:51:12 +00:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target-insns.def
target.def Add TARGET_IFUNC_REF_LOCAL_OK 2021-12-03 05:12:30 -08:00
target.h
targhooks.c vect: Convert cost hooks to classes 2021-11-04 12:31:17 +00:00
targhooks.h vect: Convert cost hooks to classes 2021-11-04 12:31:17 +00:00
timevar.c
timevar.def
timevar.h timevar: Add auto_cond_timevar class 2021-11-23 20:25:47 -05:00
toplev.c attribs: Implement -Wno-attributes=vendor::attr [PR101940] 2021-11-10 09:17:13 -05:00
toplev.h
tracer.c
tracer.h
trans-mem.c
trans-mem.h
tree-affine.c
tree-affine.h
tree-call-cdce.c
tree-cfg.c pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chrec.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-chrec.h
tree-complex.c
tree-core.h attribs: Fix wrong error with -Wno-attribute=A::b [PR103649] 2021-12-17 17:56:26 -05:00
tree-data-ref.c tree-optimization/103361 - fix unroll-and-jam direction vector handling 2021-11-23 11:04:34 +01:00
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic-path.cc
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c middle-end/103248 - fix RDIV_EXPR handling with fixed point 2021-11-19 09:35:57 +01:00
tree-eh.h
tree-emutls.c
tree-hash-traits.h
tree-hasher.h
tree-if-conv.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-if-conv.h
tree-inline.c inliner: Remove unused transform_lang_insert_block hook 2021-11-23 11:03:44 +01:00
tree-inline.h inliner: Remove unused transform_lang_insert_block hook 2021-11-23 11:03:44 +01:00
tree-into-ssa.c Replace more DEBUG_EXPR_DECL creations with build_debug_expr_decl 2021-11-16 10:45:46 +01:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
tree-nested.c
tree-nested.h
tree-nrv.c
tree-object-size.c tree-optimization/103759: Use sizetype everywhere for object sizes 2021-12-18 16:46:44 +05:30
tree-object-size.h __builtin_dynamic_object_size: Recognize builtin 2021-12-17 09:34:44 +05:30
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c First refactor of vect_analyze_loop 2021-11-05 09:03:11 +01:00
tree-parloops.h
tree-pass.h Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c openmp: Improve OpenMP target support for C++ (PR92120) 2021-12-08 22:29:06 +08:00
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-sra.h
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias-compare.h
tree-ssa-alias.c Determine global memory accesses in ipa-modref 2021-12-14 16:50:27 +01:00
tree-ssa-alias.h Implement DSE of dead functions calls storing memory. 2021-11-13 22:25:23 +01:00
tree-ssa-ccp.c Fix ICE. [PR103682] 2021-12-15 07:40:03 +08:00
tree-ssa-ccp.h
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-dce.c tree-optimization/103458 - avoid creating new loops in CD-DCE 2021-11-29 09:20:27 +01:00
tree-ssa-dce.h
tree-ssa-dom.c
tree-ssa-dom.h
tree-ssa-dse.c Improve bytewise DSE 2021-11-23 10:57:14 +01:00
tree-ssa-dse.h tree-optimization/103277 - do abnormal cleanup after call DSE 2021-11-18 10:02:17 +01:00
tree-ssa-forwprop.c forwprop: Remove incorrect assertion [PR102897] 2021-10-26 04:10:00 -05:00
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c Make ranger optional in path_range_query. 2021-11-11 22:13:17 +01:00
tree-ssa-loop-im.c tree-optimization/102436 - restore loop store motion 2021-11-19 09:35:21 +01:00
tree-ssa-loop-ivcanon.c Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
tree-ssa-loop-ivopts.c ivopts: Improve code generated for very simple loops. 2021-11-26 17:22:10 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
tree-ssa-loop-manip.h Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge 2021-11-01 00:14:01 -05:00
tree-ssa-loop-niter.c Final value replacement improvements for until-wrap loops. 2021-12-01 19:58:40 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-split.c
tree-ssa-loop-unswitch.c Use -fopt-info in unswitch pass. 2021-12-08 19:20:15 +01:00
tree-ssa-loop.c [tree-vectorizer.c] Merge pass_vectorize::execute with vectorize_loops and replace occurences of cfun with function param. 2021-11-15 15:37:36 +05:30
tree-ssa-loop.h
tree-ssa-math-opts.c Tweak tree-ssa-math-opts.c to solve PR target/102117. 2021-11-21 11:40:08 +00:00
tree-ssa-math-opts.h
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c middle-end: Fix failures with bitclear patterns on signed values 2021-11-24 06:39:05 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-ssa-propagate.c tree-optimization/103596 - fix missed propagation into switches 2021-12-07 14:07:40 +01:00
tree-ssa-propagate.h tree-optimization/103596 - fix missed propagation into switches 2021-12-07 14:07:40 +01:00
tree-ssa-reassoc.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-reassoc.h
tree-ssa-sccvn.c tree-optimization/103596 - fix missed propagation into switches 2021-12-07 14:07:40 +01:00
tree-ssa-sccvn.h tree-optimization/102920 - fix PHI VN with undefined args 2021-10-25 10:28:00 +02:00
tree-ssa-scopedtables.c
tree-ssa-scopedtables.h
tree-ssa-sink.c Remove can_throw_non_call_exceptions special case from operator_div::wi_fold. 2021-11-30 11:23:27 +01:00
tree-ssa-strlen.c Avoid assuming maximum string length is constant [PR102960]. 2021-11-16 09:18:25 -07:00
tree-ssa-strlen.h
tree-ssa-structalias.c Track nondeterminism and interposable calls in ipa-modref 2021-11-15 00:10:06 +01:00
tree-ssa-tail-merge.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadbackward.c Make ranger optional in path_range_query. 2021-11-11 22:13:17 +01:00
tree-ssa-threadedge.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-threadedge.h
tree-ssa-threadupdate.c Try to resolve paths in threader without looking further back. 2021-10-26 08:20:10 +02:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c Make EAF flags more regular (and expressive) 2021-11-10 13:08:41 +01:00
tree-ssa.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa.h
tree-ssanames.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssanames.h
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-switch-conversion.h
tree-tailcall.c
tree-vect-data-refs.c vect: Support gather loads with SLP 2021-11-30 09:52:29 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-vect-loop.c pr103523: Check for PLUS/MINUS support 2021-12-10 10:28:01 +00:00
tree-vect-patterns.c vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
tree-vect-slp-patterns.c middle-end: Handle FMA_CONJ correctly after SLP layout update. 2021-11-19 15:12:38 +00:00
tree-vect-slp.c tree-optimization/103544 - SLP reduction chain as SLP reduction issue 2021-12-06 12:53:43 +01:00
tree-vect-stmts.c vect: Fix multi-vector SLP gather loads [PR103744] 2021-12-17 14:18:39 +00:00
tree-vector-builder.c
tree-vector-builder.h
tree-vectorizer.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
tree-vectorizer.h sve: combine nested if predicates 2021-12-03 15:25:44 +00:00
tree-vrp.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-vrp.h Move ranger only VRP folder to tree-vrp. 2021-10-21 09:28:22 -04:00
tree.c middle-end: move bitmask match.pd pattern and update tests 2021-12-01 08:40:25 +00:00
tree.def
tree.h Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
treestruct.def
tristate.cc
tristate.h
tsan.c
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.c
typed-splay-tree.h
ubsan.c tree-object-size: Use trees and support negative offsets 2021-12-17 09:15:30 +05:30
ubsan.h
valtrack.c
valtrack.h
value-pointer-equiv.cc Remove unused gimple-ssa-evr-analyze.h header file. 2021-11-10 08:04:08 +01:00
value-pointer-equiv.h Convert arrays in ssa pointer_equiv_analyzer to auto_vec's. 2021-11-04 11:48:04 +01:00
value-prof.c
value-prof.h
value-query.cc Keep x_range_query NULL for global ranges. 2021-11-09 13:27:42 -05:00
value-query.h Keep x_range_query NULL for global ranges. 2021-11-09 13:27:42 -05:00
value-range-equiv.cc
value-range-equiv.h
value-range.cc ranger: Optimise irange_union 2021-12-06 18:29:30 +00:00
value-range.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
value-relation.cc Cleanup path solver dumps. 2021-11-09 14:29:22 +01:00
value-relation.h path oracle: Do not look at root oracle for killed defs. 2021-11-06 16:33:03 +01:00
var-tracking.c
varasm.c Add TARGET_IFUNC_REF_LOCAL_OK 2021-12-03 05:12:30 -08:00
varasm.h Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
varpool.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
vec-perm-indices.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
vec-perm-indices.h
vec.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
vec.h pch: Add support for relocation of the PCH data [PR71934] 2021-12-09 15:40:15 +01:00
vector-builder.h
vmsdbg.h
vmsdbgout.c
vr-values.c Unify EVRP and VRP folding predicate message. 2021-10-28 10:48:39 -04:00
vr-values.h Move vrp_simplify_cond_using_ranges into the simplifier. 2021-10-25 19:39:50 -04:00
vtable-verify.c
vtable-verify.h
warning-control.cc
web.c
wide-int-bitmask.h
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h pch: Small cleanup 2021-12-13 09:51:17 +01:00
xcoff.h
xcoffout.c
xcoffout.h

Copyright (C) 2000-2021 Free Software Foundation, Inc.

This file is intended to contain a few notes about writing C code
within GCC so that it compiles without error on the full range of
compilers GCC needs to be able to compile on.

The problem is that many ISO-standard constructs are not accepted by
either old or buggy compilers, and we keep getting bitten by them.
This knowledge until now has been sparsely spread around, so I
thought I'd collect it in one useful place.  Please add and correct
any problems as you come across them.

I'm going to start from a base of the ISO C90 standard, since that is
probably what most people code to naturally.  Obviously using
constructs introduced after that is not a good idea.

For the complete coding style conventions used in GCC, please read
http://gcc.gnu.org/codingconventions.html


String literals
---------------

Some compilers like MSVC++ have fairly low limits on the maximum
length of a string literal; 509 is the lowest we've come across.  You
may need to break up a long printf statement into many smaller ones.


Empty macro arguments
---------------------

ISO C (6.8.3 in the 1990 standard) specifies the following:

If (before argument substitution) any argument consists of no
preprocessing tokens, the behavior is undefined.

This was relaxed by ISO C99, but some older compilers emit an error,
so code like

#define foo(x, y) x y
foo (bar, )

needs to be coded in some other way.


Avoid unnecessary test before free
----------------------------------

Since SunOS 4 stopped being a reasonable portability target,
(which happened around 2007) there has been no need to guard
against "free (NULL)".  Thus, any guard like the following
constitutes a redundant test:

  if (P)
    free (P);

It is better to avoid the test.[*]
Instead, simply free P, regardless of whether it is NULL.

[*] However, if your profiling exposes a test like this in a
performance-critical loop, say where P is nearly always NULL, and
the cost of calling free on a NULL pointer would be prohibitively
high, consider using __builtin_expect, e.g., like this:

  if (__builtin_expect (ptr != NULL, 0))
    free (ptr);



Trigraphs
---------

You weren't going to use them anyway, but some otherwise ISO C
compliant compilers do not accept trigraphs.


Suffixes on Integer Constants
-----------------------------

You should never use a 'l' suffix on integer constants ('L' is fine),
since it can easily be confused with the number '1'.


			Common Coding Pitfalls
			======================

errno
-----

errno might be declared as a macro.


Implicit int
------------

In C, the 'int' keyword can often be omitted from type declarations.
For instance, you can write

  unsigned variable;

as shorthand for

  unsigned int variable;

There are several places where this can cause trouble.  First, suppose
'variable' is a long; then you might think

  (unsigned) variable

would convert it to unsigned long.  It does not.  It converts to
unsigned int.  This mostly causes problems on 64-bit platforms, where
long and int are not the same size.

Second, if you write a function definition with no return type at
all:

  operate (int a, int b)
  {
    ...
  }

that function is expected to return int, *not* void.  GCC will warn
about this.

Implicit function declarations always have return type int.  So if you
correct the above definition to

  void
  operate (int a, int b)
  ...

but operate() is called above its definition, you will get an error
about a "type mismatch with previous implicit declaration".  The cure
is to prototype all functions at the top of the file, or in an
appropriate header.

Char vs unsigned char vs int
----------------------------

In C, unqualified 'char' may be either signed or unsigned; it is the
implementation's choice.  When you are processing 7-bit ASCII, it does
not matter.  But when your program must handle arbitrary binary data,
or fully 8-bit character sets, you have a problem.  The most obvious
issue is if you have a look-up table indexed by characters.

For instance, the character '\341' in ISO Latin 1 is SMALL LETTER A
WITH ACUTE ACCENT.  In the proper locale, isalpha('\341') will be
true.  But if you read '\341' from a file and store it in a plain
char, isalpha(c) may look up character 225, or it may look up
character -31.  And the ctype table has no entry at offset -31, so
your program will crash.  (If you're lucky.)

It is wise to use unsigned char everywhere you possibly can.  This
avoids all these problems.  Unfortunately, the routines in <string.h>
take plain char arguments, so you have to remember to cast them back
and forth - or avoid the use of strxxx() functions, which is probably
a good idea anyway.

Another common mistake is to use either char or unsigned char to
receive the result of getc() or related stdio functions.  They may
return EOF, which is outside the range of values representable by
char.  If you use char, some legal character value may be confused
with EOF, such as '\377' (SMALL LETTER Y WITH UMLAUT, in Latin-1).
The correct choice is int.

A more subtle version of the same mistake might look like this:

  unsigned char pushback[NPUSHBACK];
  int pbidx;
  #define unget(c) (assert(pbidx < NPUSHBACK), pushback[pbidx++] = (c))
  #define get(c) (pbidx ? pushback[--pbidx] : getchar())
  ...
  unget(EOF);

which will mysteriously turn a pushed-back EOF into a SMALL LETTER Y
WITH UMLAUT.


Other common pitfalls
---------------------

o Expecting 'plain' char to be either sign or unsigned extending.

o Shifting an item by a negative amount or by greater than or equal to
  the number of bits in a type (expecting shifts by 32 to be sensible
  has caused quite a number of bugs at least in the early days).

o Expecting ints shifted right to be sign extended.

o Modifying the same value twice within one sequence point.

o Host vs. target floating point representation, including emitting NaNs
  and Infinities in a form that the assembler handles.

o qsort being an unstable sort function (unstable in the sense that
  multiple items that sort the same may be sorted in different orders
  by different qsort functions).

o Passing incorrect types to fprintf and friends.

o Adding a function declaration for a module declared in another file to
  a .c file instead of to a .h file.