gcc/gcc
Palmer Dabbelt a6114c2a69 RISC-V: Implement -m{,no}fence-tso
Some processors from T-Head don't implement the `fence.tso` instruction
natively and instead trap to firmware.  This breaks some users who
haven't yet updated the firmware and one could imagine it breaking users
who are trying to build firmware if they're using the C memory model.

So just add an option to disable emitting it, in a similar fashion to
how we allow users to forbid other instructions.

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070959
---
I've just smoke tested this one, but

    void func(void) { __atomic_thread_fence(__ATOMIC_ACQ_REL); }

generates `fence.tso` without the argument and `fence rw,rw` with
`-mno-fence-tso`, so it seems to be at least mostly there.  I figured
I'd just send it up for comments before putting together the DG bits:
it's kind of a pain to carry around these workarounds for unimplemented
instructions, but it's in HW so there's not much we can do about that.

gcc/ChangeLog:

	* config/riscv/riscv.opt: Add -mno-fence-tso.
	* config/riscv/sync-rvwmo.md (mem_thread_fence_rvwmo): Respect
	-mno-fence-tso.
	* doc/invoke.texi (RISC-V): Document -mno-fence-tso.
2024-05-18 15:16:45 -06:00
..
ada Fix Ada runtime library breakage on Solaris 2024-05-18 00:24:46 +02:00
analyzer diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
c Daily bump. 2024-05-16 00:17:25 +00:00
c-family Small fix to implementation of -fdump-ada-spec 2024-05-17 11:45:40 +02:00
common RISC-V: Add Zvfbfwma extension to the -march= option 2024-05-16 09:11:46 +08:00
config RISC-V: Implement -m{,no}fence-tso 2024-05-18 15:16:45 -06:00
cp c++: aggregate CTAD w/ paren init and bases [PR115114] 2024-05-17 09:02:52 -04:00
d Daily bump. 2024-04-20 00:16:57 +00:00
doc RISC-V: Implement -m{,no}fence-tso 2024-05-18 15:16:45 -06:00
fortran Fortran: Fix select type regression due to r14-9489 [PR114874] 2024-05-17 15:19:26 +01:00
ginclude
go runtime: dump registers on Solaris 2024-04-29 11:39:58 -07:00
jit Daily bump. 2024-04-10 00:16:50 +00:00
lto Daily bump. 2024-02-22 00:18:58 +00:00
m2 Daily bump. 2024-05-16 00:17:25 +00:00
objc Daily bump. 2024-05-03 00:17:26 +00:00
objcp Daily bump. 2024-05-09 10:58:01 +00:00
po Update gcc sv.po 2024-05-16 21:20:36 +00:00
rtl-ssa Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
rust Daily bump. 2024-04-16 00:18:06 +00:00
testsuite [to-be-committed,RISC-V] Improve some shift-add sequences 2024-05-18 15:08:07 -06:00
text-art diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
ABOUT-GCC-NLS
BASE-VER Bump BASE-VER. 2024-04-26 11:50:36 +02:00
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog Daily bump. 2024-05-16 00:17:25 +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-2021
ChangeLog-2022
ChangeLog-2023
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2024-05-16 00:17:25 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in [PATCH v2 1/4] Support for CodeView debugging format 2024-05-11 08:15:01 -06:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4 Remove obsolete Solaris 11.3 support 2024-05-07 10:45:55 +02:00
addresses.h
adjust-alignment.cc
alias.cc Avoid pointer compares on TYPE_MAIN_VARIANT in TBAA 2024-05-15 14:14:27 +02:00
alias.h Avoid pointer compares on TYPE_MAIN_VARIANT in TBAA 2024-05-15 14:14:27 +02:00
align.h
alloc-pool.cc
alloc-pool.h
array-traits.h
asan.cc asan: Don't instrument .ABNORMAL_DISPATCHER [PR114743] 2024-04-17 10:24:18 +02:00
asan.h hwasan: instrument new memory and string functions [PR112644] 2024-01-31 14:50:33 +00:00
attr-fnspec.h
attribs.cc middle-end/114931 - type_hash_canon and structual equality types 2024-05-07 13:05:12 +02:00
attribs.h Fix comment typos 2024-01-17 11:21:18 +01:00
auto-inc-dec.cc
auto-profile.cc Don't set full_profile in auto-profile [PR113765] 2024-04-03 17:28:30 -07:00
auto-profile.h
backend.h
basic-block.h
bb-reorder.cc bb-reorder: Fix assertion 2024-03-08 12:49:43 +01:00
bb-reorder.h
bitmap.cc Add default bitmap obstack allocation check 2024-05-03 13:26:27 +02:00
bitmap.h
btfout.cc btf: fix a possibly misleading asm debug comment 2024-04-11 15:35:42 -07:00
builtin-attrs.def
builtin-types.def
builtins.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
builtins.def Fix __builtin_nested_func_ptr_{created,deleted} symbol versions [PR113402] 2024-01-28 10:59:34 +00:00
builtins.h
caller-save.cc
calls.cc calls: Further fixes for TYPE_NO_NAMED_ARGS_STDARG_P handling [PR114136] 2024-03-01 15:48:18 +01:00
calls.h
ccmp.cc aarch64/expr: Use ccmp when the outer expression is used twice [PR100942] 2024-01-23 17:42:51 +00:00
ccmp.h
cfg-flags.def
cfg.cc
cfg.h
cfganal.cc middle-end/114480 - IDF compute is slow 2024-03-28 09:16:34 +01:00
cfganal.h
cfgbuild.cc
cfgbuild.h
cfgcleanup.cc
cfgcleanup.h
cfgexpand.cc middle-end/111422 - wrong stack var coalescing, handle PHIs 2024-05-15 18:10:52 +02:00
cfgexpand.h
cfghooks.cc
cfghooks.h
cfgloop.cc
cfgloop.h
cfgloopanal.cc
cfgloopmanip.cc cfgloopmanip, i386: Fix comment typos 2024-03-26 10:05:23 +01:00
cfgloopmanip.h
cfgrtl.cc cfgrtl: Fix MEM_EXPR update in duplicate_insn_chain [PR114924] 2024-05-03 09:23:59 +01:00
cfgrtl.h expand: Fix handling of asm goto outputs vs. PHI argument adjustments [PR113921] 2024-02-15 15:53:01 +01:00
cgraph.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
cgraph.h tree-profile: Disable indirect call profiling for IFUNC resolvers 2024-04-03 06:49:45 -07:00
cgraphbuild.cc
cgraphclones.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
cgraphunit.cc tree-profile: Disable indirect call profiling for IFUNC resolvers 2024-04-03 06:49:45 -07:00
cif-code.def
collect-utils.cc
collect-utils.h
collect2-aix.cc
collect2-aix.h
collect2.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
collect2.h
color-macros.h
combine-stack-adj.cc
combine.cc combine: Fix up simplify_compare_const [PR115092] 2024-05-15 18:37:17 +02:00
common.md
common.opt diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
common.opt.urls Regenerate common.opt.urls 2024-05-17 17:56:56 -04:00
compare-elim.cc
conditions.h
config.build
config.gcc aarch64: Build and add objects for Cygwin and MinGW for AArch64 2024-05-07 16:02:34 +00:00
config.host
config.in Remove obsolete Solaris 11.3 support 2024-05-07 10:45:55 +02:00
configure Remove obsolete Solaris 11.3 support 2024-05-07 10:45:55 +02:00
configure.ac Remove obsolete Solaris 11.3 support 2024-05-07 10:45:55 +02:00
context.cc
context.h
convert.cc convert: Fix test for out of bounds shift count [PR113574] 2024-01-25 13:15:23 +01:00
convert.h
coretypes.h
coroutine-builtins.def
coroutine-passes.cc
coverage.cc
coverage.h
cppbuiltin.cc
cppbuiltin.h
cppdefault.cc
cppdefault.h
cprop.cc
cse.cc
cselib.cc
cselib.h
cstamp-h.in
ctfc.cc
ctfc.h btf: add BTF_KIND_FUNC traversal function. 2024-02-28 19:20:20 +00:00
ctfout.cc
data-streamer-in.cc Add streaming support for prange. 2024-05-04 10:25:50 +02:00
data-streamer-out.cc Add streaming support for prange. 2024-05-04 10:25:50 +02:00
data-streamer.cc
data-streamer.h
dbgcnt.cc
dbgcnt.def
dbgcnt.h
dce.cc
dce.h
ddg.cc
ddg.h
debug.cc
debug.h
defaults.h
df-core.cc
df-problems.cc
df-scan.cc
df.h
dfp.cc
dfp.h
diagnostic-client-data-hooks.h
diagnostic-color.cc analyzer: respect GCC_COLORS in out-of-bounds diagrams [PR114588] 2024-04-05 14:49:53 -04:00
diagnostic-color.h
diagnostic-core.h diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918] 2024-03-19 20:33:27 -04:00
diagnostic-diagram.h
diagnostic-event-id.h
diagnostic-format-json.cc diagnostics: fix corrupt json/SARIF on stderr [PR114348] 2024-03-19 13:57:35 -04:00
diagnostic-format-sarif.cc diagnostics: fix corrupt json/SARIF on stderr [PR114348] 2024-03-19 13:57:35 -04:00
diagnostic-format-sarif.h
diagnostic-label-effects.h diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
diagnostic-metadata.h
diagnostic-path.h diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
diagnostic-show-locus.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
diagnostic-spec.cc
diagnostic-spec.h
diagnostic-url.h
diagnostic.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
diagnostic.def
diagnostic.h diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
digraph.cc
digraph.h
dojump.cc vect: more oversized bitmask fixups 2024-03-22 14:14:00 +00:00
dojump.h
dominance.cc
dominance.h
domwalk.cc
domwalk.h
double-int.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
double-int.h
dse.cc
dump-context.h
dumpfile.cc
dumpfile.h
dwarf2asm.cc
dwarf2asm.h
dwarf2cfi.cc
dwarf2codeview.cc [PATCH v4 4/4] Output S_COMPILE3 symbol in CodeView debug section 2024-05-11 08:24:59 -06:00
dwarf2codeview.h [PATCH v2 3/4] Output line numbers in CodeView section 2024-05-11 08:19:53 -06:00
dwarf2ctf.cc ctf: fix PR debug/112878 2024-04-10 17:31:27 -07:00
dwarf2ctf.h
dwarf2out.cc Use DW_TAG_module for Ada 2024-05-17 13:08:08 -06:00
dwarf2out.h
early-remat.cc
edit-context.cc lower-subreg, edit-context: Fix comment typos 2024-03-15 12:20:04 +01:00
edit-context.h
emit-rtl.cc
emit-rtl.h
errors.cc
errors.h
escaped_string.h
et-forest.cc
et-forest.h
except.cc except: Fix __builtin_eh_return_data_regno (-42) expansion [PR101195] 2024-01-30 09:57:21 +01:00
except.h
exec-tool.in
explow.cc
explow.h
expmed.cc Add widening expansion of MULT_HIGHPART_EXPR for integral modes 2024-05-17 11:45:40 +02:00
expmed.h Add widening expansion of MULT_HIGHPART_EXPR for integral modes 2024-05-17 11:45:40 +02:00
expr.cc [1/3] expr: Export clear_by_pieces() 2024-05-14 09:19:13 -06:00
expr.h [1/3] expr: Export clear_by_pieces() 2024-05-14 09:19:13 -06:00
fibonacci_heap.cc
fibonacci_heap.h
file-find.cc
file-find.h
file-prefix-map.cc
file-prefix-map.h
final.cc
fixed-value.cc
fixed-value.h
flag-types.h [PATCH v2 1/4] Support for CodeView debugging format 2024-05-11 08:15:01 -06:00
flags.h [PATCH v2 1/4] Support for CodeView debugging format 2024-05-11 08:15:01 -06:00
fold-const-call.cc
fold-const-call.h
fold-const.cc fold-const: Handle NON_LVALUE_EXPR in native_encode_initializer [PR114537] 2024-04-04 10:47:52 +02:00
fold-const.h
fold-mem-offsets.cc
fp-test.cc
function-abi.cc
function-abi.h
function-tests.cc
function.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
function.h Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
fwprop.cc fwprop: Restore previous behavior for forward propagation of RTL with MEMs [PR114284] 2024-03-09 13:04:26 +01:00
gcc-ar.cc
gcc-main.cc
gcc-plugin.h
gcc-rich-location.cc
gcc-rich-location.h
gcc-symtab.h
gcc-urlifier.cc v2: DOCUMENTATION_ROOT_URL vs. release branches [PR114738] 2024-04-24 18:29:12 +02:00
gcc-urlifier.def
gcc-urlifier.h
gcc.cc Driver: Add new -truncate option 2024-05-02 12:42:33 +02:00
gcc.h
gcov-counter.def Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
gcov-dump.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
gcov-io.cc
gcov-io.h Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
gcov-tool.cc
gcov.cc Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
gcse-common.cc
gcse-common.h
gcse.cc
gcse.h
gdbasan.in
gdbhooks.py gdbhooks: regex syntax error 2024-02-16 11:07:38 -05:00
gdbinit.in
gen-pass-instances.awk
genattr-common.cc
genattr.cc
genattrtab.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
genautomata.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
gencfn-macros.cc
gencheck.cc
genchecksum.cc
gencodes.cc
genconditions.cc
genconfig.cc
genconstants.cc
genemit.cc
genenums.cc
generic-match-head.cc
generic-match.h
genextract.cc
genflags.cc
gengenrtl.cc
gengtype-lex.l
gengtype-parse.cc
gengtype-state.cc
gengtype.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
gengtype.h
genhooks.cc
genmatch.cc match.pd: Optimize a * !a to 0 [PR114009] 2024-03-07 08:43:16 +01:00
genmddeps.cc
genmddump.cc
genmodes.cc
genmultilib
genopinit.cc genopinit: Split init_all_optabs [PR113575]. 2024-01-26 22:12:06 +01:00
genoutput.cc
genpeep.cc
genpreds.cc Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more 2024-02-10 11:26:26 +01:00
genrecog.cc
gensupport.cc
gensupport.h
gentarget-def.cc
genversion.cc
ggc-common.cc ggc-common: Fix save PCH assertion 2024-02-03 14:37:19 +01:00
ggc-internal.h
ggc-none.cc
ggc-page.cc Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more 2024-02-10 11:26:26 +01:00
ggc-tests.cc
ggc.h
gimple-array-bounds.cc
gimple-array-bounds.h
gimple-builder.cc
gimple-builder.h
gimple-expr.cc
gimple-expr.h
gimple-fold.cc gimple-fold: Use bitwise vector types rather than barely supported huge integral types in memcpy etc. folding [PR113988] 2024-02-28 09:40:15 +01:00
gimple-fold.h
gimple-harden-conditionals.cc
gimple-harden-control-flow.cc
gimple-if-to-switch.cc
gimple-isel.cc middle-end/113622 - allow .VEC_SET and .VEC_EXTRACT for global hard regs 2024-01-29 14:25:10 +01:00
gimple-iterator.cc Limit special asan/ubsan/bitint returns_twice handling to calls in bbs with abnormal pred [PR114687] 2024-04-12 10:59:54 +02:00
gimple-iterator.h gimple-iterator, ubsan: Fix ICE during instrumentation of returns_twice calls [PR112709] 2024-03-13 09:16:45 +01:00
gimple-laddress.cc
gimple-loop-interchange.cc
gimple-loop-jam.cc
gimple-loop-versioning.cc Remove m_nloops field from loop_versioning 2024-05-04 17:25:05 -07:00
gimple-low.cc gimple-low: Fix up handling of volatile automatic vars in assume attribute [PR110754] 2024-02-10 11:28:00 +01:00
gimple-low.h
gimple-lower-bitint.cc Limit special asan/ubsan/bitint returns_twice handling to calls in bbs with abnormal pred [PR114687] 2024-04-12 10:59:54 +02:00
gimple-lower-bitint.h
gimple-match-exports.cc
gimple-match-head.cc
gimple-match.h
gimple-predicate-analysis.cc
gimple-predicate-analysis.h
gimple-predict.h
gimple-pretty-print.cc tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal 2024-05-16 14:44:17 +02:00
gimple-pretty-print.h
gimple-range-cache.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-cache.h
gimple-range-edge.cc
gimple-range-edge.h
gimple-range-fold.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-fold.h Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-gori.cc
gimple-range-gori.h
gimple-range-infer.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-infer.h
gimple-range-op.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-op.h
gimple-range-path.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-range-path.h
gimple-range-phi.cc Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
gimple-range-phi.h tree-optimization/113475 - fix memory leak in phi_analyzer 2024-01-18 14:13:03 +01:00
gimple-range-tests.cc
gimple-range-trace.cc
gimple-range-trace.h
gimple-range.cc Add range_on_entry/exit to value_query API. 2024-04-30 17:19:57 -04:00
gimple-range.h Add range_on_entry/exit to value_query API. 2024-04-30 17:19:57 -04:00
gimple-ssa-backprop.cc
gimple-ssa-isolate-paths.cc
gimple-ssa-nonnull-compare.cc
gimple-ssa-sccopy.cc
gimple-ssa-split-paths.cc
gimple-ssa-sprintf.cc gimple-ssa-sprintf: Use [0, 1] range for %lc with (wint_t) 0 argument [PR114876] 2024-04-30 11:22:32 +02:00
gimple-ssa-store-merging.cc store-merging: Match bswap64 on 32-bit targets with bswapsi2 [PR114319] 2024-03-13 15:35:41 +01:00
gimple-ssa-strength-reduction.cc
gimple-ssa-warn-access.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
gimple-ssa-warn-access.h
gimple-ssa-warn-alloca.cc
gimple-ssa-warn-restrict.cc gimple-ssa-warn-restrict: Only use type range from NOP_EXPR for non-narrowing conversions [PR113463] 2024-01-19 10:00:51 +01:00
gimple-ssa-warn-restrict.h
gimple-ssa.h
gimple-streamer-in.cc
gimple-streamer-out.cc
gimple-streamer.h
gimple-walk.cc
gimple-walk.h
gimple-warn-recursion.cc
gimple.cc
gimple.def
gimple.h Add verification of gimple_assign_nontemporal_move_p [PR112976] 2024-04-30 08:55:19 -07:00
gimplify-me.cc
gimplify-me.h
gimplify.cc middle-end/27800 - avoid unnecessary temporary during gimplification 2024-05-07 14:19:35 +02:00
gimplify.h
glimits.h
godump.cc
graph.cc
graph.h
graphds.cc Make graph dumps use graphviz format 2024-05-02 09:01:11 +02:00
graphds.h
graphite-dependences.cc
graphite-isl-ast-to-gimple.cc
graphite-optimize-isl.cc
graphite-poly.cc
graphite-scop-detection.cc
graphite-sese-to-poly.cc graphite: Fix non-INTEGER_TYPE integral comparison handling [PR114041] 2024-02-28 09:59:45 +01:00
graphite.cc
graphite.h
graphviz.cc
graphviz.h
gsstruct.def
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.cc Fix compare-debug bootstrap failure [PR113445] 2024-01-18 14:45:27 +01:00
hard-reg-set.h
hash-map-tests.cc
hash-map-traits.h
hash-map.h
hash-set-tests.cc
hash-set.h
hash-table.cc
hash-table.h
hash-traits.h
highlev-plugin-common.h
hooks.cc
hooks.h
host-default.cc
hosthooks-def.h
hosthooks.h
hw-doloop.cc
hw-doloop.h
hwint.cc
hwint.h hwint: Fix up preprocessor conditions for GCC_PRISZ/fmt_size_t 2024-02-13 10:32:01 +01:00
ifcvt.cc
ifcvt.h
inchash.cc
inchash.h
incpath.cc
incpath.h
init-regs.cc
input.cc
input.h
insn-addr.h
insn-notes.def
int-vector-builder.h
internal-fn.cc internal-fn: Do not force vcond_mask operands to reg. 2024-05-17 22:31:42 +02:00
internal-fn.def Internal-fn: Support new IFN SAT_ADD for unsigned scalar int 2024-05-16 20:08:16 +08:00
internal-fn.h expand: Add trivial folding for bit query builtins at expansion time [PR114044] 2024-02-27 09:52:07 +01:00
intl.cc
intl.h
ipa-comdats.cc
ipa-cp.cc [prange] Avoid looking at type() for undefined ranges 2024-05-17 13:12:47 +02:00
ipa-cp.h Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
ipa-devirt.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-fnsummary.cc Fix points_to_local_or_readonly_memory_p wrt TARGET_MEM_REF 2024-05-16 15:33:55 +02:00
ipa-fnsummary.h
ipa-free-lang-data.cc Fix some comment nits 2024-04-16 09:56:16 +02:00
ipa-icf-gimple.cc ICF&SRA: Make ICF and SRA agree on padding 2024-04-08 18:54:21 +02:00
ipa-icf-gimple.h ICF&SRA: Make ICF and SRA agree on padding 2024-04-08 18:54:21 +02:00
ipa-icf.cc Hash operands of PHI in ipa-icf 2024-03-28 13:24:54 +01:00
ipa-icf.h
ipa-inline-analysis.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-inline-transform.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-inline.cc Reduce recursive inlining of always_inline functions 2024-05-14 12:58:56 +02:00
ipa-inline.h
ipa-modref-tree.cc
ipa-modref-tree.h
ipa-modref.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-modref.h
ipa-param-manipulation.cc ipa: Force args obtined through pass-through maps to the expected type (PR 113964) 2024-04-05 18:18:58 +02:00
ipa-param-manipulation.h ipa: Self-DCE of uses of removed call LHSs (PR 108007) 2024-01-24 19:13:02 +01:00
ipa-polymorphic-call.cc Remove accidental hack in ipa_polymorphic_call_context::set_by_invariant 2024-01-17 19:16:47 +01:00
ipa-predicate.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-predicate.h
ipa-profile.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-prop.cc Minor range type fixes for IPA in preparation for prange. 2024-05-07 12:17:50 +02:00
ipa-prop.h ipa: Compare jump functions in ICF (PR 113907) 2024-04-08 18:54:08 +02:00
ipa-pure-const.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-ref.cc
ipa-ref.h
ipa-reference.cc
ipa-reference.h
ipa-split.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
ipa-sra.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-strub.cc [strub] improve handling of indirected volatile parms [PR112938] 2024-04-16 01:24:59 -03:00
ipa-strub.h
ipa-utils.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ipa-utils.h
ipa-visibility.cc
ipa.cc ipa: Convert lattices from pure array to vector (PR 113476) 2024-02-21 15:43:17 +01:00
ira-build.cc
ira-color.cc
ira-conflicts.cc hwint: Introduce HOST_SIZE_T_PRINT_* 2024-02-09 11:59:17 +01:00
ira-costs.cc
ira-emit.cc
ira-int.h
ira-lives.cc
ira.cc
ira.h
is-a.h
iterator-utils.h aarch64: Ensure iterator validity when updating debug uses [PR113616] 2024-01-29 13:29:54 +00:00
json.cc
json.h
jump.cc
langhooks-def.h
langhooks.cc
langhooks.h
lcm.cc
lcm.h
libfuncs.h
limitx.h
limity.h
lists.cc
lock-and-run.sh
logical-location.h
loop-doloop.cc
loop-init.cc
loop-invariant.cc
loop-iv.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
loop-unroll.cc
loop-unroll.h
lower-subreg.cc lower-subreg, edit-context: Fix comment typos 2024-03-15 12:20:04 +01:00
lower-subreg.h
lra-assigns.cc [PR113790][LRA]: Fixing LRA ICE on riscv64 2024-03-08 14:49:01 -05:00
lra-coalesce.cc
lra-constraints.cc [PR115013][LRA]: Modify register starvation recognition 2024-05-13 11:17:56 -04:00
lra-eliminations.cc
lra-int.h
lra-lives.cc
lra-remat.cc
lra-spills.cc
lra.cc
lra.h
lto-cgraph.cc
lto-compress.cc Use fatal_error instead of internal_error for when ZSTD is not enabled 2024-03-28 21:06:43 -07:00
lto-compress.h
lto-opts.cc
lto-section-in.cc
lto-section-names.h lto, Darwin: Fix offload section names. 2024-01-18 14:02:19 +00:00
lto-section-out.cc
lto-streamer-in.cc debug/113488 - DW_AT_abstract_origin to self 2024-01-19 10:43:07 +01:00
lto-streamer-out.cc
lto-streamer.cc
lto-streamer.h
lto-wrapper.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
machmode.def
machmode.h
main.cc
make-unique.h
match.pd Internal-fn: Support new IFN SAT_ADD for unsigned scalar int 2024-05-16 20:08:16 +08:00
mcf.cc
mem-stats-traits.h
mem-stats.h
memmodel.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.cc Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
modulo-sched.cc
multiple_target.cc
mux-utils.h
obstack-utils.h
omp-api.h
omp-builtins.def
omp-expand.cc openmp: Add OpenMP _BitInt support [PR113409] 2024-01-17 10:47:31 +01:00
omp-expand.h
omp-general.cc OpenMP: Reject non-const 'condition' trait in Fortran 2024-02-13 20:55:26 +01:00
omp-general.h
omp-low.cc
omp-low.h
omp-oacc-kernels-decompose.cc
omp-oacc-neuter-broadcast.cc
omp-offload.cc
omp-offload.h
omp-selectors.h OpenMP: Reject non-const 'condition' trait in Fortran 2024-02-13 20:55:26 +01:00
omp-simd-clone.cc
omp-simd-clone.h
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-problem.cc
opt-problem.h
opt-read.awk
opt-suggestions.cc
opt-suggestions.h
optabs-libfuncs.cc expansion: Use __trunchfbf2 calls rather than __extendhfbf2 [PR114907] 2024-05-07 21:30:21 +02:00
optabs-libfuncs.h
optabs-query.cc Add widening expansion of MULT_HIGHPART_EXPR for integral modes 2024-05-17 11:45:40 +02:00
optabs-query.h
optabs-tree.cc middle-end/13421 - -ftrapv vs. POINTER_DIFF_EXPR 2024-04-30 13:03:55 +02:00
optabs-tree.h
optabs.cc Add widening expansion of MULT_HIGHPART_EXPR for integral modes 2024-05-17 11:45:40 +02:00
optabs.def Internal-fn: Support new IFN SAT_ADD for unsigned scalar int 2024-05-16 20:08:16 +08:00
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
optinfo-emit-json.cc
optinfo-emit-json.h
optinfo.cc
optinfo.h
options-urls-cc-gen.awk
opts-common.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
opts-diagnostic.h
opts-global.cc
opts-jobserver.h
opts.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
opts.h
ordered-hash-map-tests.cc
ordered-hash-map.h
output.h
params.opt Spelling fixes for translatable strings 2024-04-23 14:50:27 +02:00
params.opt.urls
pass_manager.h
passes.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
passes.def
plugin.cc
plugin.def
plugin.h
pointer-query.cc
pointer-query.h
poly-int-types.h
poly-int.h
postreload-gcse.cc Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more 2024-02-10 11:26:26 +01:00
postreload.cc
predict.cc predict: Fix comment typo 2024-03-28 15:12:08 +01:00
predict.def Fix merging of value predictors 2024-01-17 15:19:32 +01:00
predict.h
prefix.cc
prefix.h
pretty-print-urlifier.h
pretty-print.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
pretty-print.h
print-rtl-function.cc
print-rtl.cc
print-rtl.h
print-tree.cc
print-tree.h
profile-count.cc profile-count: Don't dump through a temporary buffer [PR111960] 2024-02-22 13:07:25 +01:00
profile-count.h profile-count: Avoid overflows into uninitialized [PR112303] 2024-03-28 15:00:44 +01:00
profile.cc Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
profile.h
range-op-float.cc
range-op-mixed.h Cleanup prange sanity checks. 2024-05-16 11:57:48 +02:00
range-op-ptr.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
range-op.cc Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
range-op.h Cleanup prange sanity checks. 2024-05-16 11:57:48 +02:00
range.cc Remove range_zero and range_nonzero. 2024-04-28 21:03:01 +02:00
range.h Remove range_zero and range_nonzero. 2024-04-28 21:03:01 +02:00
read-md.cc
read-md.h
read-rtl-function.cc
read-rtl-function.h
read-rtl.cc
real.cc
real.h
realmpfr.cc
realmpfr.h
recog.cc
recog.h
ree.cc
reg-notes.def
reg-stack.cc
regcprop.cc
regcprop.h
regenerate-opt-urls.py
reginfo.cc
regrename.cc
regrename.h
regs.h
regset.h
regstat.cc
reload.cc
reload.h
reload1.cc
reorg.cc
resource.cc
resource.h
rtl-error.cc
rtl-error.h
rtl-iter.h
rtl-ssa.h rtl-ssa: Ensure new defs get inserted [PR113070] 2024-01-23 13:22:11 +00:00
rtl-tests.cc
rtl.cc
rtl.def
rtl.h
rtlanal.cc rtlanal: Fix set_noop_p for volatile loads or stores [PR114768] 2024-04-19 08:47:53 +02:00
rtlanal.h
rtlhash.cc
rtlhash.h
rtlhooks-def.h
rtlhooks.cc
rtx-vector-builder.cc
rtx-vector-builder.h
run-rtl-passes.cc
run-rtl-passes.h
sancov.cc
sanitizer.def
sanopt.cc
sbitmap.cc
sbitmap.h
sched-deps.cc [PR114415][scheduler]: Fixing wrong code generation 2024-04-04 16:07:10 -04:00
sched-ebb.cc
sched-int.h [PR114415][scheduler]: Fixing wrong code generation 2024-04-04 16:07:10 -04:00
sched-rgn.cc
sel-sched-dump.cc
sel-sched-dump.h
sel-sched-ir.cc
sel-sched-ir.h
sel-sched.cc
sel-sched.h
selftest-diagnostic.cc
selftest-diagnostic.h
selftest-rtl.cc
selftest-rtl.h
selftest-run-tests.cc
selftest.cc
selftest.h analyzer: fix ICEs due to sloppy types in bounds-checking [PR110902,PR110928,PR111305,PR111441] 2024-03-18 18:44:34 -04:00
sese.cc
sese.h
shortest-paths.h
shrink-wrap.cc
shrink-wrap.h
signop.h
simplify-rtx.cc Constant fold {-1,-1} << 1 in simplify-rtx.cc 2024-05-09 22:45:54 +01:00
sort.cc
sparseset.cc
sparseset.h
spellcheck-tree.cc
spellcheck-tree.h
spellcheck.cc
spellcheck.h
splay-tree-utils.cc
splay-tree-utils.h
splay-tree-utils.tcc
sreal.cc
sreal.h
ssa-iterators.h
ssa.h
stack-ptr-mod.cc
statistics.cc
statistics.h
stmt.cc
stmt.h
stor-layout.cc C and C++ FE changes to support flexible array members in unions and alone in structures. Adjust testcases for flexible array member in union and alone in structure extension. 2024-05-06 18:32:58 +00:00
stor-layout.h gimple-fold: Use bitwise vector types rather than barely supported huge integral types in memcpy etc. folding [PR113988] 2024-02-28 09:40:15 +01:00
store-motion.cc
streamer-hooks.cc
streamer-hooks.h
stringpool.cc
stringpool.h
substring-locations.cc
substring-locations.h
symbol-summary.h
symtab-clones.cc
symtab-clones.h
symtab-thunks.cc
symtab-thunks.h
symtab.cc middle-end/114599 - fix bitmap allocation for check_ifunc_callee_symtab_nodes 2024-04-05 11:13:21 +02:00
sync-builtins.def
system.h system.h: rename vec_step to workaround powerpc/clang bug [PR114369] 2024-03-20 10:34:51 +01:00
target-def.h
target-globals.cc
target-globals.h
target-hooks-macros.h
target-insns.def
target.def c++, mingw: Fix up types of dtor hooks to __cxa_{,thread_}atexit/__cxa_throw on mingw ia32 [PR114968] 2024-05-10 09:21:38 +02:00
target.h
targhooks.cc c++, mingw: Fix up types of dtor hooks to __cxa_{,thread_}atexit/__cxa_throw on mingw ia32 [PR114968] 2024-05-10 09:21:38 +02:00
targhooks.h c++, mingw: Fix up types of dtor hooks to __cxa_{,thread_}atexit/__cxa_throw on mingw ia32 [PR114968] 2024-05-10 09:21:38 +02:00
timevar.cc
timevar.def
timevar.h
toplev.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
toplev.h
tracer.cc
tracer.h
trans-mem.cc
trans-mem.h
tree-affine.cc
tree-affine.h
tree-call-cdce.cc call-cdce: Add missing BUILT_IN_*F{32,64}X handling and improve BUILT_IN_*L [PR113993] 2024-02-22 10:19:15 +01:00
tree-cfg.cc tree-cfg: Move the returns_twice check to be last statement only [PR114301] 2024-05-15 01:07:55 -07:00
tree-cfg.h
tree-cfgcleanup.cc
tree-cfgcleanup.h
tree-chrec.cc tree-optimization/114151 - revert PR114074 fix 2024-03-19 13:11:42 +01:00
tree-chrec.h tree-optimization/114074 - CHREC multiplication and undefined overflow 2024-02-27 10:54:56 +01:00
tree-complex.cc
tree-core.h c++: Implement C++26 P2809R3 - Trivial infinite loops are not Undefined Behavior 2024-04-10 10:19:04 +02:00
tree-data-ref.cc tree-optimization/99954 - redo loop distribution memcpy recognition fix 2024-05-14 19:00:27 +02:00
tree-data-ref.h
tree-dfa.cc middle-end/113396 - int128 array index and value-ranges 2024-03-20 09:16:38 +01:00
tree-dfa.h
tree-diagnostic-client-data-hooks.cc
tree-diagnostic-path.cc diagnostics, analyzer: add CFG edge visualization to path-printing 2024-05-17 14:51:47 -04:00
tree-diagnostic.cc
tree-diagnostic.h
tree-dump.cc
tree-dump.h
tree-eh.cc
tree-eh.h
tree-emutls.cc
tree-hash-traits.h
tree-hasher.h
tree-if-conv.cc tree-optimization/114197 - unexpected if-conversion for vectorization 2024-03-04 14:55:39 +01:00
tree-if-conv.h
tree-inline.cc tree-inline: Remove .ASAN_MARK calls when inlining functions into no_sanitize callers [PR114956] 2024-05-07 21:29:14 +02:00
tree-inline.h
tree-into-ssa.cc tree-into-ssa: speed up sorting in prune_unused_phi_nodes [PR114480] 2024-05-17 15:28:45 +03:00
tree-into-ssa.h
tree-iterator.cc
tree-iterator.h
tree-logical-location.cc
tree-logical-location.h
tree-loop-distribution.cc tree-optimization/99954 - redo loop distribution memcpy recognition fix 2024-05-14 19:00:27 +02:00
tree-nested.cc OpenMP: Fix for ICE in tree-nested.cc. 2024-05-06 14:37:14 +00:00
tree-nested.h
tree-nrv.cc
tree-object-size.cc
tree-object-size.h
tree-outof-ssa.cc
tree-outof-ssa.h
tree-parloops.cc
tree-parloops.h
tree-pass.h
tree-phinodes.cc tree-optimization/114557 - reduce ehcleanup peak memory use 2024-04-03 08:56:45 +02:00
tree-phinodes.h
tree-predcom.cc predcom: Punt for steps which aren't multiples of access size [PR111683] 2024-03-23 11:17:44 +01:00
tree-pretty-print.cc Fix printing COMPOUND_EXPR in .original [PR23872] 2024-05-03 14:48:55 -07:00
tree-pretty-print.h
tree-profile.cc Guard function->cond_uids access [PR114601] 2024-04-09 13:48:20 +02:00
tree-scalar-evolution.cc tree-optimization/110490 - bitcount for narrow modes 2024-05-07 14:12:55 +02:00
tree-scalar-evolution.h
tree-sra.cc sra: Do not leave work for DSE (that it can sometimes not perform) 2024-05-09 16:51:15 +02:00
tree-sra.h ICF&SRA: Make ICF and SRA agree on padding 2024-04-08 18:54:21 +02:00
tree-ssa-address.cc
tree-ssa-address.h
tree-ssa-alias-compare.h
tree-ssa-alias.cc middle-end/115110 - Fix view_converted_memref_p 2024-05-17 12:03:58 +02:00
tree-ssa-alias.h Add missing check for const_pool in the escaped solutions 2024-05-17 10:54:11 +02:00
tree-ssa-ccp.cc Callers of irange_bitmask must normalize value/mask pairs. 2024-04-28 21:03:01 +02:00
tree-ssa-ccp.h
tree-ssa-coalesce.cc
tree-ssa-coalesce.h
tree-ssa-copy.cc
tree-ssa-dce.cc DCE __cxa_atexit calls where the function is pure/const [PR19661] 2024-05-07 14:46:37 -07:00
tree-ssa-dce.h
tree-ssa-dom.cc Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more 2024-02-10 11:26:26 +01:00
tree-ssa-dom.h
tree-ssa-dse.cc tree-optimization/79958 - make DSE track multiple paths 2024-05-16 11:03:59 +02:00
tree-ssa-dse.h
tree-ssa-forwprop.cc
tree-ssa-ifcombine.cc
tree-ssa-live.cc Avoid re-allocating vector 2024-05-07 15:28:55 +02:00
tree-ssa-live.h Remove live-info global bitmap 2024-05-02 09:01:11 +02:00
tree-ssa-loop-ch.cc tree-optimization/114792 - order loops to unloops in CH 2024-04-25 15:20:25 +02:00
tree-ssa-loop-im.cc
tree-ssa-loop-ivcanon.cc
tree-ssa-loop-ivopts.cc
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.cc
tree-ssa-loop-manip.h
tree-ssa-loop-niter.cc tree-optimization/114760 - check variants of >> and << in loop-niter 2024-05-11 17:59:12 +08:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.cc tree-ssa-loop-prefetch.cc: Honour -fno-unroll-loops 2024-05-08 10:48:45 +02:00
tree-ssa-loop-split.cc Make some integer specific ranges generic Value_Range's. 2024-04-28 21:03:00 +02:00
tree-ssa-loop-unswitch.cc
tree-ssa-loop.cc
tree-ssa-loop.h
tree-ssa-math-opts.cc Internal-fn: Support new IFN SAT_ADD for unsigned scalar int 2024-05-16 20:08:16 +08:00
tree-ssa-math-opts.h
tree-ssa-operands.cc
tree-ssa-operands.h tree-optimization/113374 - early break vect and virtual operands 2024-01-18 08:31:41 +01:00
tree-ssa-phiopt.cc PHIOPT: Value-replacement check undef 2024-04-30 09:11:55 -07:00
tree-ssa-phiprop.cc
tree-ssa-pre.cc tree-optimization/114121 - wrong VN with context sensitive range info 2024-02-28 15:03:17 +01:00
tree-ssa-propagate.cc
tree-ssa-propagate.h
tree-ssa-reassoc.cc reassoc: Fix up optimize_range_tests_to_bit_test [PR114965] 2024-05-08 10:17:32 +02:00
tree-ssa-reassoc.h
tree-ssa-sccvn.cc tree-optimization/100923 - re-do VN with contextual PTA info fix 2024-05-06 15:12:04 +02:00
tree-ssa-sccvn.h tree-optimization/114121 - wrong VN with context sensitive range info 2024-02-28 15:03:17 +01:00
tree-ssa-scopedtables.cc [committed] [PR tree-optimization/110199] Simplify MIN/MAX more often 2024-03-10 12:03:52 -06:00
tree-ssa-scopedtables.h
tree-ssa-sink.cc tree-optimization/114589 - remove profile based sink heuristics 2024-05-15 18:13:09 +02:00
tree-ssa-strlen.cc Make some integer specific ranges generic Value_Range's. 2024-04-28 21:03:00 +02:00
tree-ssa-strlen.h
tree-ssa-structalias.cc Add missing check for const_pool in the escaped solutions 2024-05-17 10:54:11 +02:00
tree-ssa-tail-merge.cc Do not record dependences from debug stmts in tail merging 2024-02-15 13:43:25 +01:00
tree-ssa-ter.cc
tree-ssa-ter.h
tree-ssa-threadbackward.cc
tree-ssa-threadedge.cc
tree-ssa-threadedge.h
tree-ssa-threadupdate.cc
tree-ssa-threadupdate.h
tree-ssa-uncprop.cc
tree-ssa-uninit.cc
tree-ssa.cc bitint: Avoid rewriting large/huge _BitInt vars into SSA after bitint lowering [PR114278] 2024-03-11 11:00:54 +01:00
tree-ssa.h
tree-ssanames.cc
tree-ssanames.h
tree-stdarg.cc
tree-stdarg.h
tree-streamer-in.cc
tree-streamer-out.cc
tree-streamer.cc
tree-streamer.h
tree-switch-conversion.cc tree-switch-conversion: Bugfixes for _BitInt [PR113491] 2024-01-20 12:35:38 +01:00
tree-switch-conversion.h
tree-tailcall.cc
tree-vect-data-refs.cc Fix non-grouped SLP load/store accounting in alignment peeling 2024-05-08 14:30:39 +02:00
tree-vect-generic.cc Minor tweaks to code computing modular multiplicative inverse 2024-05-08 10:06:17 +02:00
tree-vect-loop-manip.cc tree-optimization/114832 - wrong dominator info with vect peeling 2024-04-24 10:11:00 +02:00
tree-vect-loop.cc Vect: Support loop len in vectorizable early exit 2024-05-16 20:25:31 +08:00
tree-vect-patterns.cc Vect: Support new IFN SAT_ADD for unsigned vector int 2024-05-16 20:09:30 +08:00
tree-vect-slp-patterns.cc
tree-vect-slp.cc Refactor SLP reduction group discovery 2024-05-13 12:34:49 +02:00
tree-vect-stmts.cc Vect: Support loop len in vectorizable early exit 2024-05-16 20:25:31 +08:00
tree-vector-builder.cc
tree-vector-builder.h
tree-vectorizer.cc
tree-vectorizer.h Vect: Support loop len in vectorizable early exit 2024-05-16 20:25:31 +08:00
tree-vrp.cc Fix up duplicated words mostly in comments, part 2 2024-04-09 09:29:08 +02:00
tree-vrp.h
tree.cc middle-end/114931 - type_hash_canon and structual equality types 2024-05-07 13:05:12 +02:00
tree.def
tree.h Add condition coverage (MC/DC) 2024-04-04 20:28:44 +02:00
treestruct.def
tristate.cc
tristate.h
tsan.cc tsan: Don't instrument non-generic AS accesses [PR111736] 2024-03-26 11:13:24 +01:00
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.cc
typed-splay-tree.h
ubsan.cc ubsan: Don't -fsanitize=null instrument __seg_fs/gs pointers [PR111736] 2024-03-22 09:24:42 +01:00
ubsan.h
valtrack.cc
valtrack.h
value-pointer-equiv.cc
value-pointer-equiv.h
value-prof.cc
value-prof.h
value-query.cc Add range_on_entry/exit to value_query API. 2024-04-30 17:19:57 -04:00
value-query.h Add range_on_entry/exit to value_query API. 2024-04-30 17:19:57 -04:00
value-range-pretty-print.cc Implement basic prange class. 2024-05-04 10:25:50 +02:00
value-range-pretty-print.h Implement basic prange class. 2024-05-04 10:25:50 +02:00
value-range-storage.cc [prange] Do not assume all pointers are the same size [PR115009] 2024-05-10 09:00:56 +02:00
value-range-storage.h Add storage support for prange. 2024-05-04 10:25:50 +02:00
value-range.cc [prange] Drop range to VARYING if the bitmask intersection made it so [PR115131] 2024-05-17 16:03:17 +02:00
value-range.h Revert "Revert: "Enable prange support."" 2024-05-16 11:59:08 +02:00
value-relation.cc ranger: Grow BBs in relation oracle as needed [PR113735] 2024-02-08 14:21:17 +01:00
value-relation.h
var-tracking.cc Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some more 2024-02-10 11:26:26 +01:00
varasm.cc Rename section and encoding functions from i386 which will be used in aarch64 2024-05-07 16:02:33 +00:00
varasm.h
varpool.cc
vec-perm-indices.cc
vec-perm-indices.h
vec.cc
vec.h
vector-builder.h
vmsdbg.h
vmsdbgout.cc
vr-values.cc Use a boolean type when folding conditionals in simplify_using_ranges. 2024-05-16 11:57:48 +02:00
vr-values.h
vtable-verify.cc
vtable-verify.h
warning-control.cc
web.cc
wide-int-bitmask.h
wide-int-print.cc
wide-int-print.h
wide-int.cc Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more 2024-02-24 12:45:40 +01:00
wide-int.h
xcoff.h

README.Portability

Copyright (C) 2000-2024 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.