gcc/
2014-09-26 David Sherwood <david.sherwood@arm.com>
* ira-int.h (ira_allocno): Add "wmode" field.
* ira-build.c (create_insn_allocnos): Add new "parent" function
parameter.
* ira-conflicts.c (ira_build_conflicts): Add conflicts for registers
that cannot be accessed in wmode.
From-SVN: r215707
Running the testsuite with a -fsanitize=undefined instrumented compiler
shows:
% gcc -O2 -flto -fno-use-linker-plugin -flto-partition=none testsuite/gcc.dg/torture/pr28045.c
gcc/data-streamer.c:113:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
The fix is obvious.
From-SVN: r215706
Make -Q --help print the --param default, min, max values, similar
to how it does print the defaults for other flags. This is useful
to let a option auto tuner automatically query all needed information
abourt gcc params (previously it needed to access the .def file in
the source)
gcc/:
2014-09-29 Andi Kleen <ak@linux.intel.com>
* opts.c (print_filtered_help): Print --param min/max/default
with -Q.
From-SVN: r215704
This supports clang, which by default issues warnings about
unused command line arguments, a habit that interacts poorly
with configure scripts.
From-SVN: r215699
* tree-vrp.c (get_single_symbol): New function.
(build_symbolic_expr): Likewise.
(symbolic_range_based_on_p): New predicate.
(extract_range_from_binary_expr_1): Deal with single-symbolic ranges
for PLUS and MINUS. Do not drop symbolic ranges at the end.
(extract_range_from_binary_expr): Try harder for PLUS and MINUS if
operand is symbolic and based on the other operand.
From-SVN: r215697
2014-09-29 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
* gcc.dg/vmx/ops.c: Remove calls to vec_splat, vec_vsplth,
vec_vspltw, and vec_vspltb for which the second argument is out of
range.
From-SVN: r215691
Fix ICE. Need use VOID instead of SI, or when real VOIDmode comes, it does not
match SImode, so cause issue.
2014-09-25 Chen Gang <gang.chen.5i5j@gmail.com>
gcc:
* config/microblaze/microblaze.md (call_internal1): Use VOID
instead of SI to fix "((void (*)(void)) 0)()" issue
gcc/testsuite:
* gcc.c-torture/compile/calls-void.c: New test.
From-SVN: r215684
PR middle-end/63247
* omp-low.c (lower_omp_target): For OMP_CLAUSE_MAP_POINTER
of ARRAY_TYPE, if not OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION
use the alignment of avar rather than ovar.
From-SVN: r215678
gcc/
2014-09-26 Jakub Jelinek <jakub@redhat.com>
Max Ostapenko <m.ostapenko@partner.samsung.com>
* common.opt: New option.
* doc/invoke.texi: Describe new option.
* gcc.c (execute): Don't free first string early, but at the end
of the function. Call retry_ice if compiler exited with
ICE_EXIT_CODE.
(main): Factor out common code.
(print_configuration): New function.
(files_equal_p): Likewise.
(check_repro): Likewise.
(run_attempt): Likewise.
(do_report_bug): Likewise.
(append_text): Likewise.
(try_generate_repro): Likewise
Co-Authored-By: Max Ostapenko <m.ostapenko@partner.samsung.com>
From-SVN: r215633
The Linux kernel dynamically patches in __fentry__ calls in and
out at runtime. This allows using function tracing for debugging
in production kernels without (significant) performance penalty.
For this it needs a table pointing to each __fentry__ call.
The way it is currently implemented is that a special
perl script scans the object file, generates the table in a special
section. When the kernel boots up it nops the calls, and
then later patches in the calls again as needed.
The recordmcount.pl script in the kernel works, but it seems
cleaner and faster to support the code generation of the patch table
directly in gcc.
This also allows to nop the calls directly at code generation
time, which allows to skip a patching step at kernel boot.
I also expect that a patchable production tracing facility is also useful
for other applications.
For example it could be used in ftracer
(https://github.com/andikleen/ftracer)
Having a nop area at the beginning of each function can be also
also useful for other things. For example it can be used to patch
functions at runtime to point to different functions, to do
binary updates without restarting the program (like ksplice or
similar)
This patch implements two new options for the i386 target:
-mrecord-mcount
Generate a __mcount_loc section entry for each __fentry__ or mcount
call. The section is compatible with the kernel convention
and the data is put into a section loaded at runtime.
-mnop-mcount
Generate the mcount/__fentry__ call as 5 byte nop that can be
patched in later. The nop is generated as a single instruction,
as the Linux kernel run time patching relies on this.
Limitations:
- I didn't implement -mnop-mcount for -fPIC. This
would need a good single instruction 6 byte NOP and it seems a
bit pointless, as the patching would prevent text sharing.
- I didn't implement noping for targets that pass a variable
to mcount.
- The facility could be useful on architectures too. Currently
the mcount code is target specific, so I made it a i386 option.
gcc/:
2014-09-25 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (x86_print_call_or_nop): New function.
(x86_function_profiler): Support -mnop-mcount and
-mrecord-mcount.
* config/i386/i386.opt (-mnop-mcount, -mrecord-mcount): Add
* doc/invoke.texi: Document -mnop-mcount, -mrecord-mcount.
gcc/testsuite:
2014-09-25 Andi Kleen <ak@linux.intel.com>
* gcc.target/i386/nop-mcount.c: New file.
* gcc.target/i386/record-mcount.c: New file.
From-SVN: r215629
* ipa-devirt.c (polymorphic_call_target_d): Add SPECULATIVE; reorder
for better storage.
(polymorphic_call_target_hasher::hash): Hash SPECULATIVE.
(possible_polymorphic_call_targets): Instead of computing both
speculative and non-speculative answers, do just one at a time.
Replace NONSPECULATIVE_TARGETSP parameter with SPECULATIVE flag.
(dump_targets): Break out from ...
(dump_possible_polymorphic_call_targets): ... here; dump both speculative
and non-speculative lists.
(ipa_devirt): Update for new possible_polymorphic_call_targets API.
* ipa-utils.h (possible_polymorphic_call_targets): Update.
* testsuite/g++.dg/ipa/devirt-34.C: Update template.
From-SVN: r215614
gcc/
* shrink-wrap.c (move_insn_for_shrink_wrap): Initialize the live-in of new
created BB as the intersection of live-in from "old_dest" and live-out from
"bb".
gcc/testsuite/
* gcc.target/i386/shrink_wrap_1.c: New test.
From-SVN: r215611