aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'aosp/master' into replicant-6.0HEADreplicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0masterJoonas Kylmälä2018-08-2795-653/+2078
|\
| * Merge "Add __emutls_unregister_key function"Treehugger Robot2018-07-111-4/+7
| |\
| | * Add __emutls_unregister_key functionRyan Prichard2018-06-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the existing __attribute__((destructor)) function, unregister_emutls_key, with a function that something else must call explicitly. We don't want the pthread key deleted at program exit, because it's unnecessary and because it may delete the key before other tls-using cleanup code runs. Exposing __emutls_unregister_key allows limiting the cleanup to dlclose (e.g. by calling it only from crtbegin_so.c). Reset emutls_key_created so multiple calls to __emutls_unregister_key are safe. Bug: b/80453944 Test: manual Change-Id: I82d13614ae8042d0501fd2ca64f0ef6189669905
| * | libgcc: work around old Bionic loader bugRyan Prichard2018-06-281-0/+24
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dl_iterate_phdr returns a 0 load_base for a PIE executable when it should return the address where the executable was loaded (e.g. the load base or load bias). Recalculate the load base when it is zero. This recalculation should work on any ELF file with a PT_PHDR segment -- it will calculate 0 for a non-PIE executable. The load base is added to an ELF virtual address to produce a run-time address. Recalculate it by subtracting the PT_PHDR's virtual address from its run-time address. Bug: https://github.com/android-ndk/ndk/issues/505 Test: manual Test: run NDK tests (./checkbuild.py && ./run_tests.py) Change-Id: I7de46c07a8b04e794b59f07b4d554238cfd6d5d9
| * Delay emutls deallocation for one roundRyan Prichard2018-05-221-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | With Android/Bionic, delay deallocation to round 2 of 4. It must run after C++ thread_local destructors have been called, but before the final 2 rounds, because emutls calls free, and jemalloc then needs another 2 rounds to free its thread-specific data. Bug: https://github.com/android-ndk/ndk/issues/687 Bug: b/78022094 Test: manual Test: ./run_tests.py --rebuild --filter emutls-dealloc Change-Id: I01bd634d97b7d22161b5cc8ca71b3cb94064a03e
| * Merge "gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics."android-build-prod (mdb)2018-04-265-3/+48
| |\
| | * gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics.Yunlian Jiang2018-04-255-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports upstream patch to add support of vrdn<*>_f64 intrinisics for aarch64. This is needed because glibc 2.27 uses some of them. Author: mshawcroft <mshawcroft@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Apr 22 08:39:48 2014 +0000 [AArch64] vrnd<*>_f64 patch This patch adds vrnd<*>_f64 aarch64 intrinsics. A testcase for those intrinsics is added. Run a complete LE and BE regression run with no regressions. BUG=chromium:834385 TEST=./setup_board --board kevin --nousepkg cross-aarch64-cros-linux-gnu-glibc builds for glibc 2.27 Change-Id: Iaf9508a433e35d3304e44ac4b6c93071ff6c5ec0
| * | gcc: backport an upstream patch to make it work with newer glibc.Yunlian Jiang2018-04-2410-11/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer glibc removes 'struct' tag from ucontext_t. Because of this, gcc failed to bootstrap with newer glibc. This patch from upstream fixes that. BUG=chromium:834385 TEST=sudo emerge sys-devel/gcc passes with newer glibc installed. commit 14c2f22a1877f6b60a2f7c2f83ffb032759456a6 Author: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Jul 4 10:22:56 2017 +0000 Use ucontext_t not struct ucontext in linux-unwind.h files. Current glibc no longer gives the ucontext_t type the tag struct ucontext, to conform with POSIX namespace rules. This requires various linux-unwind.h files in libgcc, that were previously using struct ucontext, to be fixed to use ucontext_t instead. This is similar to the removal of the struct siginfo tag from siginfo_t some years ago. This patch changes those files to use ucontext_t instead. As the standard name that should be unconditionally safe, so this is not restricted to architectures supported by glibc, or conditioned on the glibc version. Tested compilation together with current glibc with glibc's build-many-glibcs.py. Change-Id: I433dd983b8d18c538d96486f7362b953ece3bfb8
| * [GCC] Fix #endif problem in libgcc/emutls.cCaroline Tice2018-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently in emutls.c 'emutls_key_created' is defined within part of an ifdef, but is accessed outside the ifdef, which can cause issues in builds where the ifdef is not taken. This CL moves the #endif to include the new function that accesses 'emutls_key_created' so that all references to it are within the defining if-def. Bug: b/72942688 Test: Fix tested in ChromeOS. Change-Id: Ic1d6760d116b63abaef18f95e38de42af30952e4
| * [GCC] Update with latest retpoline fixes from Intel.Caroline Tice2018-01-2966-310/+628
| | | | | | | | | | | | | | | | | | | | | | | | Intel has updated their retpoline patches since we created our original patch. This CL updates our retpoline changes to match the latest from Intel. Bug: None Test: Tested extensively in ChromeOS. Built x86 platform & kernel images in Android. Change-Id: Id1a18cb1f1f4461832a017cb5c5d59e5400d9d08
| * Merge "[libgcc] Fix emutls.c to not leak pthread keys."Caroline Tice2018-01-191-0/+10
| |\
| | * [libgcc] Fix emutls.c to not leak pthread keys.Caroline Tice2018-01-191-0/+10
| | | | | | | | | | | | | | | | | | Bug:b/71814577 Test:Built toolchain w/change and successfully tested building both platform and kernel images with new toolchain for marlin (pixel) device. Change-Id: Ia0c6944ce1d78b5bd57d65f705a3f7a59c944202
| * | [GCC] Commit retpoline patch code, for fixing security issues.Caroline Tice2018-01-0862-622/+1613
| |/ | | | | | | | | | | | | | | | | | | | | | | This applies the Intel GCC code patches, to allow compiling with appropriate flags for mitigating the indirect branch variant of the speculative execution security flaw. Bug: None Test: This is already in place in ChromeOS and has been tested on the ChromeOS kernels. Change-Id: Ideffb433b697f1fe7e4ca2c1eaa968160abfcc8b
| * Merge "Remove -Bsymbolic from the Android link spec."Treehugger Robot2017-09-141-1/+1
| |\
| | * Remove -Bsymbolic from the Android link spec.Dan Albert2016-01-141-1/+1
| | | | | | | | | | | | | | | Bug: http://b.android.com/68956 Change-Id: I60bef8715de7920d72ebc9a6bd7f18ceaea05966
| * | Disable linker PIE support with copy reloc.Rahul Chaudhry2017-07-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature gets enabled with binutils 2.27 upgrade, but breaks unittests in chromium os: - https://bugs.chromium.org/p/chromium/issues/detail?id=738188 This is because of the upstream gcc bug for which the patches were not backported to 4.9.x branches: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 BUG: None TEST: Chromium OS unittests pass again. Change-Id: I9827cbe56378727f979991993d06de0b4c6b5478
| * | Fix GCC bug PR 46639, for kernel securityCaroline Tice2017-01-3052-180/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel security team asked us to fix this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 This CL does that. Note: This CL depends on https://android-review.googlesource.com/329799 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 Test: Ran build.py for all toolchain versions; used resulting compilers to build bullhead, angler and fugu plaform images. Ran checkbuild.py. Change-Id: I1e1abf594cff56c6ed6dc228a1d084da18c11420
* | | Fix GCC bug PR 46639, for kernel securityCaroline Tice2017-02-1252-180/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel security team asked us to fix this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 This CL does that. Note: This CL depends on https://android-review.googlesource.com/329799 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 Test: Ran build.py for all toolchain versions; used resulting compilers to build bullhead, angler and fugu plaform images. Ran checkbuild.py. Change-Id: I1e1abf594cff56c6ed6dc228a1d084da18c11420
* | | Remove inline redeclaration of libc_name_pWolfgang Wiedmeyer2016-12-092-8/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | prevents build error with recent gcc: In file included from .././../../../../../src/gcc/gcc-4.9/gcc/cp/except.c:1013:0: cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’: cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here cfns.gperf: At global scope: cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined Change-Id: I5130fc219d5fa39913ffa18a33185dcb64508dd3 Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* | [GCC 4.9] Fix posix_memalign declaration.Caroline Tice2016-10-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the 'throw()' from posix_memalign declaration if __GLIBC__ is not defined, so that it matches declaration in bionic's stdlib.h (avoid conflicting decl error). Can't remove 'throw ()' altogether, because it IS in glibc's stdlib.h, which this has to match in ChromeOS. BUG=b:31366027 TEST=successfully built ChromeOS for x86, x86_64, arm, arm64 and ran HWTests on all; successfully built chromiumos-sdk. Built Android platform & kernel. Successfully ran NDK checkbuild.py script. Change-Id: I0a8b4daf5d10f56f7a318738a0946e4ad5b7dd90
* | Fix gthreads for ChromeOS, too (recent change broke ChromeOS).Caroline Tice2016-05-122-14/+2
| | | | | | | | Change-Id: Ic7f1a0cd3375b6e247f1ca972922ecf5452a33ac
* | Attempt to fix missing gthreads in libstdc++.Caroline Tice2016-04-252-4/+4
| | | | | | | | | | | | | | | | | | The if-else clauses of an if-statement were reversed, causing libstdc++ to not find/define the gthreads. This CL should fix that. Bug: http://b/27433401 Change-Id: Ic8a0afbd4cfdff48cfa4edf931cda2f1409dae34
* | [ndk gcc] Finish fixing the libatomic IFUNC problem.Caroline Tice2016-04-013-8/+21
| | | | | | | | | | | | | | | | | | The previous CL, with --enable-libatomic-ifuncs, was missing an important piece. This fixes that problem. (See https://buganizer.corp.google.com/issues/22699878) Change-Id: I42f9529f5e40187843a9a55ae80874eb8fae2a22
* | Merge "Add top-level flag, --enable-libatomic-ifuncs=[yes/no]"Caroline Tice2016-03-293-0/+36
|\ \
| * | Add top-level flag, --enable-libatomic-ifuncs=[yes/no]Caroline Tice2016-03-253-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds a top-level configure flag, --enable-libatomic-ifuncs. IF this is set to 'no', then libatomic will not be configured/built to use IFUNC. This is to fix https://buganizer.corp.google.com/issues/22699878 Change-Id: I76741fe854fc9c32a230b67c72920adfb00473ee
* | | Fix issue of generating symlinks for libgnustl_shared.soCaroline Tice2016-03-252-105/+51
|/ / | | | | | | | | | | | | | | | | | | | | | | With the changes that unified the Android & ChromeOS GCC compiler, some of the conditional changes introduced with the enable-bionic-libs flags were causing libgnustl_shared.so to be generated with symbol versions and symbolic links, which broke certain things. This CL fixes that issue (https://buganizer.corp.google.com/issues/27832514) Change-Id: Ib7fe825f2be353e0ff7beba008a71793b1ad2244
* | GCC unification, part 2. Fix various errors from previous unificaiton.Caroline Tice2016-03-1613-161/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version of the unified GCC compiler (Android & ChromeOS) caused some ChromeOS tests to fail. It also caused an Android NDK test case to fail. This CL fixes those problems. In particular it does the following: - Fix some file formatting errors from previous unification patch. - Update ChangeLog files to reflect Android backport patches. - Find and incorporate a few missing pieces from the following backports backports from trunk r221007, r221675, r222011, r212011, r214942, r214957, r215012, r215016, r218115, r218733, r218746, r220491. This involved small changes in the following files: gcc/cfghoks.c gcc/cfgloop.c gcc/cfgloop.h gcc/except.c gcc/loop-init.c gcc/omp-low.c - Fix minor Android test case regression introduced in the previous unification patch. Change-Id: I482e3a34e3ed97c7ba609fe2954b4781f02ec617
* | Unify ChromeOS and Android versions of GCC.Caroline Tice2016-02-2693-335/+1505
| | | | | | | | | | | | | | | | This CL updates Android's GCC to match ChromeOS's GCC (with appropriate patches applied in both places to make sure no cherry-picked changes are lost). Change-Id: I390140c449b0e5df9ee78a06268319c8c510302f
* | Revert "Fix toolchain/gcc build for mingw."Than McIntosh2016-01-155-92/+77
|/ | | | | | | | | This reverts commit f1c3ad6cac0465017759cce0cb381ce66760d907. [Change no longer needed since we're switching to a different gcc for the mingw build.] Change-Id: I03a57335e9ca94c6848cb71bbc1a451f0c0ef18f
* Fix toolchain/gcc build for mingw.Than McIntosh2016-01-145-77/+92
| | | | | | | | | | | | | | | Theses changes are intended to restore the ability to build toolchain/gcc cross compiler for non-Android targets (in this specific case, to allow us to compile toolchain/gcc as part of the mingw-w64 build). What has happened over time is that references android-specific synbols and constructs have crept into the non-target-specific portions of the gcc code. I've done my best to push these things back into the config/* subtree. Bug: 26523949 Change-Id: I59334e791875632d51093207c298052a034d2f4a
* Merge "[4.9] Disable inlining of memcpy for x86 with 'rep movs'."Dan Albert2016-01-041-1/+1
|\
| * [4.9] Disable inlining of memcpy for x86 with 'rep movs'.Alexander Ivchenko2015-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | On big length 'rep movs' are less efficient than libcall of highly-optimized Bionic memcpy. Change-Id: I9435b9e438e0e40c28c505c43ec7f9797384afd6 Signed-off-by: Andrew Senkevich <andrew.senkevich@intel.com> Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
* | Cherrypick PR bootstrap/66638 bugfix from trunk.amker2015-12-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR bootstrap/66638 * tree-ssa-loop-niter.c (loop_exits_before_overflow): Skip if assertion failed. Remove assertion itself. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225008 138bc75d-0d04-0410-961f-82ee72b054a4 Bug: 26224556 Change-Id: I2fa31bfe44978659a554a413c64d796b357338b5 Signed-off-by: Than McIntosh <thanm@google.com>
* | cherry-pick fix for gcc bug 67954 (svn rev 230894)Than McIntosh2015-12-111-9/+12
| | | | | | | | | | | | | | | | | | | | | | 2015-11-25 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/67954 * lra-constraints.c (curr_insn_transform): Add check on scratch pseudo when change class to NO_REGS. Add an assert. Bug: 26144438 Change-Id: I976c78c466b9d430afe86742026bbcc568db825d
* | Merge "Default to TLS guard for x86 stack-protector."Than McIntosh2015-11-201-3/+2
|\ \
| * | Default to TLS guard for x86 stack-protector.Than McIntosh2015-11-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default guard flavor for -fstack-protector on x86 from global to TLS. The original default was intended to provide compatibility with pre-4.2. versions of Android, which is less of concern now. Bug: 25183510 Change-Id: I71931e778efed2ba0fa2a6740f8d5510776c113f
* | | Change gcc BASE-VER from 4.9.x-google to 4.9.Than McIntosh2015-11-181-1/+1
|/ / | | | | | | | | | | | | | | Simplify BASE-VER for gcc from 4.9.x-google to 4.9, so as to be consistent with NDK versioning naming scheme. Bug: 25487043 Change-Id: I4f0e2a0998f35840467248ad004ee81dedfdfc28
* | Fix for N9 kernel build.Than McIntosh2015-10-161-60/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-pick from trunk: commit 39f4504dbc88d17c496cdf7b12fb0d32277d281d Author: pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Jun 3 22:42:47 2014 +0000 2014-06-03 Andrew Pinski <apinski@cavium.com> * config/aarch64/aarch64.c (aarch64_if_then_else_costs): New function. (aarch64_rtx_costs): Use aarch64_if_then_else_costs. Bug: 24985248 Change-Id: Ic03ba2552615fca0aa0de6af47f47ae4cf074e3b
* | Fix for b/23822150 (arm64 bad code for copysignl)Than McIntosh2015-10-091-11/+26
|/ | | | | | | | | | This bug was inherited from the google/gcc-4_9 branch; a change was "temporarily" patched out in r216495, then never restored. Bug: 23822150 Change-Id: Ibfc9f65e108e9c9b3dca263920bdae3cc6f75080
* Reapplied the patch 525b640e8dc9e6063897a7ce8034283Alexander Ivchenko2015-09-141-0/+6
| | | | | | | | | | | | | | | | | ... with peeling limit set to 400 instead of 200 as it used to be. [4.9] Another backport from trunk of additional slm tuning. 2014-11-21 Evgeny Stupachenko <evstupac@gmail.com> * config/i386/i386.c (ix86_option_override_internal): Increase PARAM_MAX_COMPLETELY_PEELED_INSNS. Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com> Signed-off-by: Egor Kochetov <egor.kochetov@intel.com> (cherry picked from commit 1f170f4a426b1ed354345de5aaba634036854e43) Change-Id: Ie395a6602c8305530ebc02f9006d84f98365857a
* Merge changes I65f8bbbc,Iaa65e2d1,Ifa0139c9,Ic39d2a2b,I78cf0a23Dan Albert2015-09-0913-3/+1293
|\ | | | | | | | | | | | | | | | | * changes: backport fix for PR65735 backport patch to fix PR65177 backport patch to fix PR65048 backport patch for PR 64878: do not jump thread across more than one back-edge port revision 219584 from linaro/gcc-4_9-branch
| * backport fix for PR65735Sebastian Pop2015-08-282-6/+27
| | | | | | | | | | | | | | | | | | | | PR tree-optimization/65735 * tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths): Remove visited_phis argument, add visited_bbs, avoid recursing into the same bb rather than just into the same phi node. (thread_through_normal_block): Adjust caller. * gcc.c-torture/compile/pr65735.c: New test.
| * backport patch to fix PR65177Sebastian Pop2015-08-282-26/+91
| | | | | | | | | | | | | | | | | | | | PR tree-optimization/65177 * tree-ssa-threadupdate.c (verify_seme): Renamed verify_jump_thread. (bb_in_bbs): New. (duplicate_seme_region): Renamed duplicate_thread_path. Redirect all edges not adjacent on the path to the original code. * gcc.dg/tree-ssa/ssa-dom-thread-10.c: New.
| * backport patch to fix PR65048Sebastian Pop2015-08-282-6/+84
| | | | | | | | | | | | | | | | | | | | PR tree-optimization/65048 * tree-ssa-threadupdate.c (valid_jump_thread_path): New. (thread_through_all_blocks): Call valid_jump_thread_path. Remove invalid FSM jump-thread paths. PR tree-optimization/65048 * gcc.dg/tree-ssa/ssa-dom-thread-9.c: New.
| * backport patch for PR 64878: do not jump thread across more than one back-edgeSebastian Pop2015-08-282-3/+456
| | | | | | | | | | | | | | | | | | | | | | | | 2015-02-04 Sebastian Pop <s.pop@samsung.com> Brian Rzycki <b.rzycki@samsung.com> PR tree-optimization/64878 * tree-ssa-threadedge.c: Include tree-ssa-loop.h. (fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi. Stop recursion at loop phi nodes after having visited a loop phi node. * testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
| * port revision 219584 from linaro/gcc-4_9-branchSebastian Pop2015-08-289-3/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ 2015-01-14 Yvan Roux <yvan.roux@linaro.org> Backport from trunk r218451. 2014-12-06 James Greenhalgh <james.greenhalgh@arm.com> Sebastian Pop <s.pop@samsung.com> Brian Rzycki <b.rzycki@samsung.com> PR tree-optimization/54742 * params.def (max-fsm-thread-path-insns, max-fsm-thread-length, max-fsm-thread-paths): New. * doc/invoke.texi (max-fsm-thread-path-insns, max-fsm-thread-length, max-fsm-thread-paths): Documented. * tree-cfg.c (split_edge_bb_loc): Export. * tree-cfg.h (split_edge_bb_loc): Declared extern. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Restore the original value of cond when simplification fails. (fsm_find_thread_path): New. (fsm_find_control_statement_thread_paths): New. (thread_through_normal_block): Call find_control_statement_thread_paths. * tree-ssa-threadupdate.c (dump_jump_thread_path): Pretty print EDGE_FSM_THREAD. (verify_seme): New. (duplicate_seme_region): New. (thread_through_all_blocks): Generate code for EDGE_FSM_THREAD edges calling duplicate_seme_region. * tree-ssa-threadupdate.h (jump_thread_edge_type): Add EDGE_FSM_THREAD. gcc/testsuite/ 2015-01-14 Yvan Roux <yvan.roux@linaro.org> Backport from trunk r218451. 2014-12-06 James Greenhalgh <james.greenhalgh@arm.com> Sebastian Pop <s.pop@samsung.com> Brian Rzycki <b.rzycki@samsung.com> PR tree-optimization/54742 * gcc.dg/tree-ssa/ssa-dom-thread-6.c: New test. * gcc.dg/tree-ssa/ssa-dom-thread-7.c: New test.
* | [4.9] Add several improvements for AArch64ktkachov2015-09-092-39/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from GCC 5. 2015-04-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Properly handle mvn-register and add EON+shift pattern and cost appropriately * config/aarch64/aarch64.md (*eor_one_cmpl_<SHIFT:optab><mode>3_alt): New pattern. (*eor_one_cmpl_<SHIFT:optab>sidi3_alt_ze): Likewise. * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle MVN-shift appropriately. Handle alternative EON form. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222637 138bc75d-0d04-0410-961f-82ee72b054a4 2015-04-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Properly cost FABD pattern * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle pattern for fabd in ABS case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222638 138bc75d-0d04-0410-961f-82ee72b054a4 2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Remember to cost operand 0 in FP compare-with-0.0 case * config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case): Add cost of op0 in the compare-with-fpzero case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222673 138bc75d-0d04-0410-961f-82ee72b054a4 2015-05-01 Wilco Dijkstra <wdijkstr@arm.com> Fix aarch64_rtx_costs of PLUS/MINUS * gcc/config/aarch64/aarch64.c (aarch64_rtx_costs): Calculate cost of op0 and op1 in PLUS and MINUS cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222676 138bc75d-0d04-0410-961f-82ee72b054a4 2015-07-27 Wilco Dijkstra <wdijkstr@arm.com> Improve spill code - swap order in shl pattern * config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_<mode>3): Place integer variant first. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226247 138bc75d-0d04-0410-961f-82ee72b054a4 2015-07-27 Wilco Dijkstra <wdijkstr@arm.com> Improve spill code - swap order in shr patterns * gcc/config/aarch64/aarch64.md (aarch64_lshr_sisd_or_int_<mode>3): Place integer variant first. (aarch64_ashr_sisd_or_int_<mode>3): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226253 138bc75d-0d04-0410-961f-82ee72b054a4 2015-08-04 Pawel Kupidura <pawel.kupidura@arm.com> * config/aarch64/aarch64.c: Change inner loop statement cost to be consistent with other targets. Change-Id: If5b10466302d733fcae6eacc9d128fdb8f95c0de git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226575 138bc75d-0d04-0410-961f-82ee72b054a4
* | Merge "[4.9] Adjust several costs for AArch64."Dan Albert2015-09-082-206/+1092
|\ \
| * | [4.9] Adjust several costs for AArch64.jgreenhalgh2015-08-282-206/+1092
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from trunk 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Refactor aarch64_address_costs. gcc/ * config/aarch64/aarch64-protos.h (scale_addr_mode_cost): New. (cpu_addrcost_table): Use it. * config/aarch64/aarch64.c (generic_addrcost_table): Initialize it. (aarch64_address_cost): Rewrite using aarch64_classify_address, move it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210493 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Add cost tables for Cortex-A57 gcc/ * config/aarch64/aarch64.c (cortexa57_addrcost_table): New. (cortexa57_vector_cost): Likewise. (cortexa57_tunings): Use them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210494 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Better estimate cost of building a constant gcc/ * config/aarch64/aarch64.c (aarch64_build_constant): Conditionally emit instructions, return number of instructions which would be emitted. (aarch64_add_constant): Update call to aarch64_build_constant. (aarch64_output_mi_thunk): Likewise. (aarch64_rtx_costs): Estimate cost of a CONST_INT, cost a CONST_DOUBLE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210496 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Add cost tables for Cortex-A57 gcc/ * config/aarch64/aarch64.c (cortexa57_addrcost_table): New. (cortexa57_vector_cost): Likewise. (cortexa57_tunings): Use them. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Wrap aarch64_rtx_costs to dump verbose output gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs_wrapper): New. (TARGET_RTX_COSTS): Call it. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Better estimate cost of building a constant gcc/ * config/aarch64/aarch64.c (aarch64_build_constant): Conditionally emit instructions, return number of instructions which would be emitted. (aarch64_add_constant): Update call to aarch64_build_constant. (aarch64_output_mi_thunk): Likewise. (aarch64_rtx_costs): Estimate cost of a CONST_INT, cost a CONST_DOUBLE. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Factor out common MULT cases gcc/ * config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename to... (aarch64_strip_extend): ...this, don't strip shifts, check RTX is well formed. (aarch64_rtx_mult_cost): New. (aarch64_rtx_costs): Use it, refactor as appropriate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210497 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Set default costs and handle vector modes. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210498 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve SET cost. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costing for SET RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210499 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Cost memory accesses using address costs gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Use address costs when costing loads and stores to memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210500 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Better cost logical operations gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve cost for logical operations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210501 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for sign/zero extend operations gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost ZERO_EXTEND and SIGN_EXTEND better. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210502 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for rotate and shift operations. * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for rotates and shifts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210503 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for sign/zero extracts gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for SIGN/ZERO_EXTRACT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210504 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Improve costs for div/mod gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for DIV/MOD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210505 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost comparisons, flag setting operators and IF_THEN_ELSE gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost comparison operators. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210506 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost more Floating point RTX. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost FMA, FLOAT_EXTEND, FLOAT_TRUNCATE, ABS, SMAX, and SMIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210507 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost TRUNCATE gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost TRUNCATE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210508 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Cost for SYMBOL_REF, HIGH and LO_SUM gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost SYMBOL_REF, HIGH, LO_SUM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210509 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Dump a message if we are unable to cost an insn. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case where we were unable to cost an RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210510 138bc75d-0d04-0410-961f-82ee72b054a4 2014-08-26 Evandro Menezes <e.menezes@samsung.com> Fix typos in cost data structure. * config/arm/aarch64/aarch64.c (generic_addrcost_table): Delete qi cost; add di cost. (cortexa57_addrcost_table): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214503 138bc75d-0d04-0410-961f-82ee72b054a4
* | | Merge changes I9c3e680b,I56c1a4fd,I4eb84d2bDan Albert2015-09-0815-221/+953
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | * changes: PR tree-optimization/48052 PR tree-optimization/52563, tree-optimization/62173 Cherry-pick: PR tree-optimization/65447