Age | Commit message (Collapse) | Author | Files | Lines |
|
Followup to commit 383400a6078d75bbfa1216c9af2c37f7e88740c9
gcc/ChangeLog
* doc/invoke.texi (nvptx's -misa): Update default to sm_35.
|
|
This patch fixes the PR by adjusting the input types of the intrinsic
prototypes to the ones mandated by ACLE
Turns out the tests in the testsuite were already using the correct
ones, but implicit conversions hid the bug...
Bootstrapped and tested on aarch64-none-linux-gnu.
gcc/
PR target/97349
* config/aarch64/arm_neon.h (vdupq_n_p8, vdupq_n_p16,
vdupq_n_p64, vdupq_n_s8, vdupq_n_s16, vdupq_n_u8, vdupq_n_u16):
Fix argument type.
gcc/testsuite/
PR target/97349
* gcc.target/aarch64/simd/pr97349.c: New test.
|
|
The vector copysign pattern incorrectly assumes that vector
if_then_else operates on bits, not on elements. This can theoretically
mislead the optimizers. Fix by changing it to use bitwise operations,
like commit 2930bb321794 ("PR94613: Fix vec_sel builtin for IBM Z") did
for vec_sel builtin.
gcc/ChangeLog:
2020-10-07 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390-protos.h (s390_build_signbit_mask): New
function.
* config/s390/s390.c (s390_contiguous_bitmask_vector_p):
Bitcast the argument to an integral mode.
(s390_expand_vec_init): Do not call
s390_contiguous_bitmask_vector_p with a scalar argument.
(s390_build_signbit_mask): New function.
* config/s390/vector.md (copysign<mode>3): Use bitwise
operations.
|
|
Fixes a symbol resolver bug where a private alias becomes public if used
before its declaration.
Reviewed-on: https://github.com/dlang/dmd/pull/11831
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 70aabfb51
|
|
Fixes the return codes to match the documentation of
Target::isVectorTypeSupported.
Reviewed-on: https://github.com/dlang/dmd/pull/11830
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 3a9790525
* d-target.cc (Target::isVectorTypeSupported): Adjust return codes for
invalid size and invalid base type.
|
|
gcc/ChangeLog:
PR tree-optimization/97371
* range-op.cc (operator_rshift::op1_range): Ignore shifts larger than
or equal to type precision.
gcc/testsuite/ChangeLog:
* gcc.dg/pr97371.c: New test.
|
|
Prevents the following UBSAN error:
./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/torture/pr49770.C -O2 -c
/home/marxin/Programming/gcc2/gcc/ipa-modref-tree.h:482:22: runtime error: load of value 2, which is not a valid value for type 'bool'
#0 0x1fdb4d1 in modref_tree<int>::merge(modref_tree<int>*, vec<modref_parm_map, va_heap, vl_ptr>*) /home/marxin/Programming/gcc2/gcc/ipa-modref-tree.h:482
#1 0x1fcadaa in merge_call_side_effects(modref_summary*, gimple*, modref_summary*, bool) /home/marxin/Programming/gcc2/gcc/ipa-modref.c:511
#2 0x1fcbadd in analyze_call /home/marxin/Programming/gcc2/gcc/ipa-modref.c:642
#3 0x1fcc061 in analyze_stmt /home/marxin/Programming/gcc2/gcc/ipa-modref.c:732
#4 0x1fccf31 in analyze_function /home/marxin/Programming/gcc2/gcc/ipa-modref.c:823
#5 0x1fd17e5 in execute /home/marxin/Programming/gcc2/gcc/ipa-modref.c:1441
#6 0x25cca6e in execute_one_pass(opt_pass*) /home/marxin/Programming/gcc2/gcc/passes.c:2509
#7 0x25cd39b in execute_pass_list_1 /home/marxin/Programming/gcc2/gcc/passes.c:2597
#8 0x25cd450 in execute_pass_list_1 /home/marxin/Programming/gcc2/gcc/passes.c:2598
#9 0x25cd4ee in execute_pass_list(function*, opt_pass*) /home/marxin/Programming/gcc2/gcc/passes.c:2608
#10 0x25c7a5a in do_per_function_toporder(void (*)(function*, void*), void*) /home/marxin/Programming/gcc2/gcc/passes.c:1726
#11 0x25cfa3f in execute_ipa_pass_list(opt_pass*) /home/marxin/Programming/gcc2/gcc/passes.c:2941
#12 0x173572d in ipa_passes /home/marxin/Programming/gcc2/gcc/cgraphunit.c:2642
#13 0x17364ee in symbol_table::compile() /home/marxin/Programming/gcc2/gcc/cgraphunit.c:2777
#14 0x17372d9 in symbol_table::finalize_compilation_unit() /home/marxin/Programming/gcc2/gcc/cgraphunit.c:3022
#15 0x2a1f00a in compile_file /home/marxin/Programming/gcc2/gcc/toplev.c:485
#16 0x2a27dc8 in do_compile /home/marxin/Programming/gcc2/gcc/toplev.c:2321
#17 0x2a283cc in toplev::main(int, char**) /home/marxin/Programming/gcc2/gcc/toplev.c:2460
#18 0x54f21cd in main /home/marxin/Programming/gcc2/gcc/main.c:39
#19 0x7ffff6f0de09 in __libc_start_main ../csu/libc-start.c:314
#20 0x9eac09 in _start (/home/marxin/Programming/gcc2/objdir/gcc/cc1plus+0x9eac09)
gcc/ChangeLog:
* ipa-modref.c (merge_call_side_effects): Clear modref_parm_map
fields in the vector.
|
|
This appropriately makes matches all true after successful SLP discovery
to reliably succeed splitting. We were picking up an eventual all
false built-up from scalars state in some cases.
2020-10-12 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_analyze_slp_instance): Set matches to true
after successful discovery but forced split.
|
|
Currently, in order to use the switch -msoft-stack-reserve-local with the
default arg 128, you have to specify '-msoft-stack-reserve-local128'.
Fix the switch format such that you specify '-msoft-stack-reserve-local=128'
instead.
Tested on nvptx.
gcc/ChangeLog:
2020-10-12 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.opt (-msoft-stack-reserve-local): Rename to ...
(-msoft-stack-reserve-local=): ... this.
|
|
This avoids abnormals in another place.
2020-10-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/97357
* tree-ssa-loop-split.c (ssa_semi_invariant_p): Abnormal
SSA names are not semi invariant.
* gcc.dg/pr97357.c: New testcase.
|
|
Only check for kind if the type supports kind.
2020-10-12 Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/fortran/ChangeLog:
PR fortran/96099
* decl.c (gfc_match_implicit): Check for numeric and logical
types.
2020-10-12 Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/testsuite/ChangeLog:
PR fortran/96099
* gfortran.dg/pr96099_1.f90: New test.
* gfortran.dg/pr96099_2.f90: New test.
|
|
|
|
Importing them as intrinsics enables GCC to treat them as builtins
whose behavior is known by GCC.
Specifically, if they aren't intrinsics, calls to Sin and Cos won't be
combined into sincos.
We still need to make Sin and Cos wrappers inline in user-exposed
interfaces to get users the benefit of this transformation.
That is forthcoming in a separate patch.
for gcc/ada/ChangeLog
* libgnat/a-numaux.ads: Make all imports Intrinsic.
* libgnat/a-numaux__darwin.ads: Likewise.
* libgnat/a-numaux__libc-x86.ads: Likewise.
* libgnat/a-numaux__vxworks.ads: Likewise.
|
|
Newer linkers want protocols to be private-extern and weak.
This is conditional on the runtime version.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(create_global_decl): Update to allow the caller to
specify declaration or definition.
(create_hidden_decl): Likewise.
(next_runtime_abi_02_protocol_decl): Make the symbol
weak and hidden for later OS runtime versions.
(build_v2_protocol_list_address_table): Likewise.
|
|
This fixes a regression present from 8.x; It used to be OK
to test for a DECL_INITIAL value to flag that an ivar was a
bitfield (the initial value was the width). This still works
on C / Objective-C, but no longer on C++. Replace the test
with DECL_C_BIT_FIELD() which is set for both C and C++.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Test
DECL_C_BIT_FIELD to detect that an ivar is a bitfield.
|
|
The @selector() and @protocol() operators produce var decls
these do not work with the example plugin. Unfortunatetely,
unlike the ObjC front end, it is not so easy to construct a
substitute expression that works reliably. Where it does not
work we xfail for now.
gcc/testsuite/ChangeLog:
* obj-c++.dg/plugin/diagnostic-test-expressions-1.mm:
Adjust testcase to include expressions for @selector and
@protocol. XFAIL where this is still not sufficient to obtain
a disgnostic range.
|
|
On newer systems, the throw/catch process sends retain and release
messages to thrown objects. While these are not needed in the testsuite
cases, they cause the tests to fail because the selector is not handled.
Add dummy methods to the testsuite object.
gcc/testsuite/ChangeLog:
* objc-obj-c++-shared/TestsuiteObject.h: Add dummy retain and
release method declarations.
* objc-obj-c++-shared/TestsuiteObject.m: Add dummy retain and
release implementations.
|
|
Update the dg-skip to cover newer systems.
gcc/testsuite/ChangeLog:
* obj-c++.dg/objc-gc-3.mm:i Skip for Darwin >= 16.
|
|
This test contains elements incompatible with modern Objective-C
headers, it is only of relevance to Darwin8 or potentially on systems
with SDKs that could target Darwin8, so skip it on newer systems.
gcc/testsuite/ChangeLog:
* obj-c++.dg/cxx-ivars-3.mm: Skip for macOS >= 10.7.
|
|
The version 2 GNU Objective C API is mostly compatible with the NeXT one.
However, there are a few testsuite tweaks needed (and one test fails for NeXT
without considerable increase in complexity).
gcc/testsuite/ChangeLog:
* obj-c++.dg/gnu-api-2-class-meta.mm: Add a flag to cause NeXT
headers to expose prototypes for messaging.
* obj-c++.dg/gnu-api-2-class.mm: Likewise.
* obj-c++.dg/gnu-api-2-objc.mm: Skip this because of the extra
protocols pulled in by system headers.
|
|
The @selector and @protocol keywords produce a var decl without
useful location information. The current diagnostics plugin does not
look at VAR_DECLs (and it would not be helpful if it did in this
case, since a single decl is shared across all the users).
However, ee can, in this case, make expressions that produce useful
information.
gcc/testsuite/ChangeLog:
* objc.dg/plugin/diagnostic-test-expressions-1.m: Use assignment
expressions for @selector and @protocol to obtain a useful
diagnostic range.
|
|
We were using a callout to runtime.h which, eventually brings in the system
runtime.h. One newer versions of the Darwin/NeXT headers this declares the
objc_getClass() function as returning Class, rather than the internal
representation of that. This breaks a fragile assumption in objc-act that
the use of these internal functions can be deduced by looking at the function
type. Ultimately, the fragility should be fixed - but this fixes up the test
so that it only uses the compiler's forward declaration of the function.
gcc/testsuite/ChangeLog:
* objc.dg/call-super-2.m: Remove inclusion of runtime.h.
Add a FIXME about the test portability.
|
|
Newer versions of the runtime / NSObject don't respond to forward:.
This uses the replacement.
gcc/testsuite/ChangeLog:
* objc.dg/torture/forward-1.m: Implement forwarding using the
native NeXT (NSInvocation) method for Darwin.
|
|
Older versions of the runtime don't like it when the root class
has a missing initialize method. They try to forward to an non-
existent super class resulting in a crash.
TODO: maybe we can diagnose this.
gcc/testsuite/ChangeLog:
* objc.dg/ivar-scope-4.m: Add inititialize method to the
root class.
|
|
The GNU v2 API matches the next v2 API in most respects.
However, some of the tests depend on access to items that the
later NeXT headers consider to be 'internal implementation details'
and are not exposed (we arrange that with a DEFINE).
One test is skipped here because, although it works internally, the
number of objects returned is larger for the NeXT runtime in some
cases (where the headers have been updated to bring in more of the
system details).
gcc/testsuite/ChangeLog:
* objc.dg/gnu-api-2-class-meta.m: Add a flag to cause NeXT
headers to expose prototypes for messaging. Mark the root
class if the objc_root_class attribute is available. Use
char ** as the second arg to main.
* objc.dg/gnu-api-2-class.m: Use dispatch prototype.
* objc.dg/gnu-api-2-objc.m: Skip on NeXT because of extra
prototypes pulled in by headers.
|
|
Objective-C GC is not available for any recent Darwin version, nor
is it available for the upcoming release of Darwin20.
gcc/testsuite/ChangeLog:
* objc.dg/objc-gc-4.m: Disable for macOS 10.15 and 11.x.
|
|
Changes to deal with warnings and/or errors seen when compiling the
tests with clang.
gcc/testsuite/ChangeLog:
* objc-obj-c++-shared/TestsuiteObject.h: If the compiler
supports objc_root_object attributes, then mark the testsuite
object accordingly.
* objc-obj-c++-shared/TestsuiteObject.m: Avoid direct access
to isa, which is an error for modern Objective-C.
* objc/execute/class-tests-1.h: Declare a string function we
use locally (avoid pulling in the whole of string.h).
|
|
Earlier linkers cannot handle publicly-visible (or linker-visible)
metadata, so we need to make the output of these conditional on version.
gcc/ChangeLog:
* config/darwin.c (darwin_globalize_label): Make a subset of
metadate symbols global.
(darwin_label_is_anonymous_local_objc_name): Make a subset of
metadata symbols linker-visible.
(darwin_override_options): Track more target OS versions, make
the next_runtime version track this (unless it's set to 0 for
GNU runtime).
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c (FIXUP_NEEDED): Rename ...
(USE_FIXUP_BEFORE): ... to this.
(next_runtime_02_initialize): Likewise.
(next_runtime_abi_02_get_arg_type_list_base): Likewise.
(next_runtime_abi_02_build_objc_method_call): Likewise.
|
|
Newer versions of ld64 require that some meta-data symbols are
global, and that a larger set are linker-visible.
gcc/ChangeLog:
* config/darwin.c (darwin_globalize_label): Add protocol
meta-data labels to the set that are global.
(darwin_label_is_anonymous_local_objc_name): Arrange for meta-
data start labels to be linker-visible.
|
|
Platform compilers based on LLVM do not use the objc_sendMsg_fixit
and friends for newer editions of the OS (runtimes for Arm64 do not even
have those entries).
We need to arrange to allow for this codegen on modern Darwin.
The _fixit versions are needed for some OS versions (at least, up to
10.6) since the super2 call is not implemented there. It does not
seem worth making the codegen more fine-grained at present.
Other parts of the codegen need to be made conditional on either the
runtime version or the linker capabilities.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c (TAG_MSGSENDSUPER): Revised
spelling.
(TAG_MSGSENDID): Likewise.
(TAG_MSGSENDSUPER_STRET): Likewise.
(TAG_MSGSENDID_STRET): Likewise.
(FIXUP_NEEDED): Likewise.
(TAG_FIXUP): New.
(next_runtime_02_initialize): Adjust message calls to use
fixup variants only when required.
(next_runtime_abi_02_get_arg_type_list_base): Correct
indent.
(build_v2_build_objc_method_call): New.
(build_v2_objc_method_fixup_call): Split out from ...
(next_runtime_abi_02_build_objc_method_call): ... here.
Arrange to adjust the call on the basis of the target
runtime.
|
|
For the NeXT/Darwin runtime as installed on macOS, we now
need to deal with changes in ABI and APIs over the range
of system versions supported.
For the first phase of these changes, we will make the
existing flag_next_runtime carry a value that represents
the target OS version. It might be necessary to extend the
value to represent the ABI ('fragile', V1/V2) or the linker
capabilities (some changes to the linker-visible and public
symbols are dependent on linker version).
TODO: arrange to set the default NEXT_OBJC_RUNTIME on the
basis of the configured target version.
gcc/ChangeLog:
* config/darwin.c (darwin_objc2_section): Allow for
values > 1 to represent the next runtime.
(darwin_objc1_section): Likewise.
* config/darwin.h (NEXT_OBJC_RUNTIME): Set the default
next runtime value to be 10.5.8.
|
|
For current system toolchains NeXT runtime metadata symbols are not
mangled for Objective-C++ (i.e. they are considered to be
'extern "C"').
This change becomes essential when we start to emit metadata refs
as hidden and weak which is required by later editions of the runtime
and linkers.
gcc/objc/ChangeLog:
* objc-runtime-shared-support.c (start_var_decl): Make the
decl_assembler_name follow the metadata name for C++ on NeXT
runtime platforms.
|
|
Make the order of the class and superclass match the metadata
order from clang. Makes it easier to compare produced meta-
data between implementations.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(next_runtime_abi_02_category_decl): Adjust category
superclass name ordering.
|
|
Later versions of the NeXT runtime protocol metadata contain additional
fields. This patch adds these fields and populates a new list of
method types.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c (build_v2_super_template): Add new
fields to the template.
(build_v2_protocol_template): Build new field entries.
(generate_v2_meth_descriptor_table): Adjust to allow recording all
method types.
(generate_v2_meth_type_list): New.
(build_v2_protocol_initializer): Initialize the additional fields.
(generate_v2_protocols): Record method types for all entries and
generate the additional method type table.
|
|
|
|
* ipa-modref.c (modref_transform): Fix parameter map computation.
|
|
When function splitting clones a function sinf in the host compiler, the clone
is callled sinf.part.0. However, ptx does not allows dots in identifiers, so
we run into:
...
ptxas test.o, line 23; fatal : Parsing error near '.part': syntax error
ptxas fatal : Ptx assembly aborted due to errors
nvptx-as: ptxas returned 255 exit status
...
Rename such functions by replacing the dots with dollar signs.
Tested check-gcc on nvptx.
Tested libgomp on x86_64-linux with nvptx accelerator.
gcc/ChangeLog:
2020-10-10 Tom de Vries <tdevries@suse.de>
PR target/97318
* config/nvptx/nvptx.c (nvptx_replace_dot): New function.
(write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn):
Use nvptx_replace_dot.
|
|
Factor out write_fn_proto_1 from write_fn_proto.
Tested check-gcc on nvptx.
Tested libgomp on x86_64-linux with nvptx accelerator.
gcc/ChangeLog:
2020-10-10 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (write_fn_proto_1): New function, factored out
of ...
(write_fn_proto): ... here. Return void.
|
|
* ipa-modref.c (remap_arguments): Check range in map access.
|
|
* ipa-modref.c (modref_transform): Use reserve instead of safe_grow.
|
|
* ipa-modref.c (modref_transform): Check that summaries are allocated.
|
|
* ipa-modref-tree.h (struct modref_tree): Revert prevoius change.
* ipa-modref.c (analyze_function): Dump original summary.
(modref_read): Only set IPA if streaming summary (not optimization
summary).
(remap_arguments): New function.
(modref_transform): New function.
(compute_parm_map): Fix offset calculation.
(ipa_merge_modref_summary_after_inlining): Do not merge stores when
they can be ignored.
|
|
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Improve debug dumps.
(call_may_clobber_ref_p_1): Improve debug dumps.
|
|
The current code assumed that super refs could be computed
indirectly, i.e. that the metadata generated by the compiler
was immutable by the runtime. This does not always hold
(it depends on the NeXT runtime version). So, compute super
refs directly.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(objc_get_superclass_ref_decl): Split this code out.
(next_runtime_abi_02_get_class_super_ref): Compute
super refs using the objc_get_superclass_ref_decl().
(next_runtime_abi_02_get_category_super_ref): Likewise.
|
|
At one time, the system linkers needed to have at least a dummy
entry for every Objective-C section in use. This removes the extra
emitted code when it is not needed by the linker.
gcc/ChangeLog:
* config/darwin.c (output_objc_section_asm_op): Avoid extra
objective-c section switches unless the linker needs them.
|
|
Newer versions of ld64 are more picky about adherence to placement
rules for objective c metadata. This adds protocol refs and uses
the ivar refs for all targets.
gcc/ChangeLog:
* config/darwin-sections.def (objc2_data_section): New.
(objc2_ivar_section): New.
* config/darwin.c (darwin_objc2_section): Act on Protocol and
ivar refs.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(next_runtime_abi_02_init_metadata_attributes): Make protocol
refs a distinct section.
|
|
Newer versions of the runtime expect to find strings for class, method
and method types in set-aside sections rather than the general c_strings
one.
gcc/ChangeLog:
* config/darwin-sections.def (objc2_class_names_section,
objc2_method_names_section, objc2_method_types_section): New
* config/darwin.c (output_objc_section_asm_op): Output new
sections. (darwin_objc2_section): Select new sections where
used.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(next_runtime_abi_02_init_metadata_attributes): Attach metadata
for the special string sections to class, method and method type
string sections.
|
|
This removes references to the next runtime from the gnu runtime
implementation.
gcc/objc/ChangeLog:
* objc-gnu-runtime-abi-01.c
(build_shared_structure_initializer): Remove references to
the NeXT runtime.
(generate_static_references): Likewise.
|
|
Much of the existing work in the Darwin BSS and common sections
was to accommodate the PowerPC section anchors. We want to segregate
this, since it might become desirable to support section anchors for
arm64.
First revision (here) is to use the same section conventions as the Xcode
toochains for BSS and COMMON.
We also drop the constraint about putting small items into data/static data
that was a work-around for Java issues (irrelevant for several editions).
gcc/ChangeLog:
* config/darwin.c (darwin_emit_local_bss): Amend section names to
match system tools. (darwin_output_aligned_bss): Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/darwin-sections.c: Adjust test for renamed BSS and common
sections. Cater for 64 and 128 bit long doubles.
|
|
x86-64-v2 includes CMPXCHG16B. Since -mcx16 enables CMPXCHG16B and
defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16, check it in x86-64-v[234]
tests.
PR target/97250
* gcc.target/i386/x86-64-v2.c: Verify that
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 is defined.
* gcc.target/i386/x86-64-v3.c: Likewise.
* gcc.target/i386/x86-64-v4.c: Likewise.
|