This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch trunk
in repository gcc.
from 408da55 Daily bump.
new d1a8d2a * MAINTAINERS (loop ivopts): Add the entry and myself.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
ChangeLog | 4 ++++
MAINTAINERS | 1 +
2 files changed, 5 insertions(+)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch aoliva/pr64164
in repository gcc.
The following commit(s) were added to refs/heads/aoliva/pr64164 by this push:
new ec7d074 use rtl_for_parm to test unsplit complex
ec7d074 is described below
commit ec7d07471bf4d7b73a2bcebf0ab2b3977607eda5
Author: Alexandre Oliva <aoliva(a)redhat.com>
Date: Sun Aug 2 23:04:14 2015 -0300
use rtl_for_parm to test unsplit complex
---
gcc/function.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/function.c b/gcc/function.c
index 9447d51..16708e9 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3535,12 +3535,12 @@ assign_parms_unsplit_complex (struct assign_parm_data_all *all,
(inner, GET_MODE (imag)));
}
- if ((tmp = DECL_RTL_IF_SET (parm))
+ if ((tmp = rtl_for_parm (all, parm)) != NULL_RTX
&& rtx_equal_p (real,
read_complex_part (tmp, false))
&& rtx_equal_p (imag,
read_complex_part (tmp, true)))
- ; /* We have the right rtl in parm and tmp already. */
+ ; /* We now have the right rtl in tmp. */
else if (TREE_ADDRESSABLE (parm))
{
rtx rmem, imem;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch trunk
in repository gcc.
from 5b252e9 gcc/ChangeLog 2015-07-28 Martin Sebor <msebor(a)redhat.com>
new 408da55 Daily bump.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
gcc/DATESTAMP | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch trunk
in repository gcc.
from 17afcef Improve -Wmisleading-indentation heuristics
new 5b252e9 gcc/ChangeLog 2015-07-28 Martin Sebor <msebor(a)redhat.com>
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
gcc/ChangeLog | 9 ++++
gcc/builtins.c | 28 ++++++-----
gcc/c-family/c.opt | 4 ++
gcc/doc/extend.texi | 14 ++++--
gcc/doc/invoke.texi | 9 +++-
gcc/testsuite/ChangeLog | 9 ++++
gcc/testsuite/g++.dg/Wframe-address-in-Wall.C | 14 ++++++
gcc/testsuite/g++.dg/Wframe-address.C | 70 +++++++++++++++++++++++++++
gcc/testsuite/g++.dg/Wno-frame-address.C | 6 +++
gcc/testsuite/gcc.dg/Wframe-address-in-Wall.c | 14 ++++++
gcc/testsuite/gcc.dg/Wframe-address.c | 54 +++++++++++++++++++++
gcc/testsuite/gcc.dg/Wno-frame-address.c | 6 +++
12 files changed, 220 insertions(+), 17 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/Wframe-address-in-Wall.C
create mode 100644 gcc/testsuite/g++.dg/Wframe-address.C
create mode 100644 gcc/testsuite/g++.dg/Wno-frame-address.C
create mode 100644 gcc/testsuite/gcc.dg/Wframe-address-in-Wall.c
create mode 100644 gcc/testsuite/gcc.dg/Wframe-address.c
create mode 100644 gcc/testsuite/gcc.dg/Wno-frame-address.c
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch trunk
in repository gcc.
from 9255be0 Refactor entry point to -Wmisleading-indentation
new f95bfdd Remove is_first_nonwhitespace_on_line(), instead improve get_ [...]
new 17afcef Improve -Wmisleading-indentation heuristics
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
gcc/c-family/ChangeLog | 13 ++
gcc/c-family/c-indentation.c | 220 ++++++++++++++++-----
gcc/testsuite/ChangeLog | 4 +
.../c-c++-common/Wmisleading-indentation.c | 166 ++++++++++++++++
4 files changed, 354 insertions(+), 49 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch master
in repository gcc.
from 9255be0 Refactor entry point to -Wmisleading-indentation
new f95bfdd Remove is_first_nonwhitespace_on_line(), instead improve get_ [...]
new 17afcef Improve -Wmisleading-indentation heuristics
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
gcc/c-family/ChangeLog | 13 ++
gcc/c-family/c-indentation.c | 220 ++++++++++++++++-----
gcc/testsuite/ChangeLog | 4 +
.../c-c++-common/Wmisleading-indentation.c | 166 ++++++++++++++++
4 files changed, 354 insertions(+), 49 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a change to branch trunk
in repository gcc.
from 3d5db02 2015-08-01 Michael Collison <michael.collison(a)linaro.org [...]
new 9255be0 Refactor entry point to -Wmisleading-indentation
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
gcc/c-family/ChangeLog | 13 ++++++
gcc/c-family/c-common.h | 7 ---
gcc/c-family/c-indentation.c | 79 ++++++++++++++++++++++++++--------
gcc/c-family/c-indentation.h | 52 ++++++++++++++++++++++
gcc/c/ChangeLog | 12 ++++++
gcc/c/c-parser.c | 81 +++++++++++++++++++----------------
gcc/cp/ChangeLog | 14 ++++++
gcc/cp/parser.c | 100 +++++++++++++++++++------------------------
8 files changed, 240 insertions(+), 118 deletions(-)
create mode 100644 gcc/c-family/c-indentation.h
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
unknown user pushed a commit to branch aoliva/pr64164
in repository gcc.
commit 10138926d441ba0f3bed01f5aefa6f2c165cfcfd
Author: Alexandre Oliva <aoliva(a)redhat.com>
Date: Sat Aug 1 22:04:17 2015 -0300
try special handling of byref parms
for gcc/ChangeLog
PR middle-end/67034
* cfgexpand.c (parm_maybe_byref_p): New.
(expand_one_ssa_partition): Call it. Expand maybe-byref parms
with a placeholder for the mem addr.
* function.c (assign_parm_setup_block): Replace the
placeholder with the address of the newly-allocated block.
(assign_parm_setup_reg): Replace the placeholder with a
newly-created pseudo. Arrange for the pseudo to be
initialized from the incoming passed pointer. Don't copy the
BLKmode data, just check that it was a maybe_byref parm.
* cfgexpand.h (parm_maybe_byref_p): Declare.
* tree-ssa-coalesce.c: Include cfgexpand.h.
(gimple_can_coalesce_p): Do not coalesce maybe-byref parms
with SSA_NAMEs of other variables, or anonymous SSA_NAMEs.
---
gcc/cfgexpand.c | 33 ++++++++++++++++++++++-
gcc/cfgexpand.h | 1 +
gcc/function.c | 70 +++++++++++++++++++++++++++----------------------
gcc/tree-ssa-coalesce.c | 12 ++++++---
4 files changed, 80 insertions(+), 36 deletions(-)
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 9577ad6d..5b89359 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -172,6 +172,26 @@ leader_merge (tree cur, tree next)
return cur;
}
+/* Return true if VAR is a PARM_DECL or a RESULT_DECL of type BLKmode.
+ Such parameters are likely passed as a pointer to the value, rather
+ than as a value, and so we must not coalesce them, nor allocate
+ stack space for them before determining the calling conventions for
+ them. For their SSA_NAMEs, expand_one_ssa_partition emits RTL as
+ MEMs with pc_rtx as the address, and then it replaces the pc_rtx
+ with NULL so as to make sure the MEM is not used before it is
+ adjusted in assign_parm_setup_reg. */
+
+bool
+parm_maybe_byref_p (tree var)
+{
+ if (!var || VAR_P (var))
+ return false;
+
+ gcc_assert (TREE_CODE (var) == PARM_DECL
+ || TREE_CODE (var) == RESULT_DECL);
+
+ return TYPE_MODE (TREE_TYPE (var)) == BLKmode;
+}
/* Return the RTL for the default SSA def of a PARM or RESULT, if
there is one. */
@@ -1315,7 +1335,18 @@ expand_one_ssa_partition (tree var)
if (!use_register_for_decl (var))
{
- if (defer_stack_allocation (var, true))
+ if (parm_maybe_byref_p (SSA_NAME_VAR (var)))
+ {
+ expand_one_stack_var_at (var, pc_rtx, 0, 0);
+ rtx x = SA.partition_to_pseudo[part];
+ gcc_assert (GET_CODE (x) == MEM);
+ gcc_assert (GET_MODE (x) == BLKmode);
+ gcc_assert (XEXP (x, 0) == pc_rtx);
+ /* Reset the address, so that any attempt to use it will
+ ICE. It will be adjusted in assign_parm_setup_reg. */
+ XEXP (x, 0) = NULL_RTX;
+ }
+ else if (defer_stack_allocation (var, true))
add_stack_var (var);
else
expand_one_stack_var_1 (var);
diff --git a/gcc/cfgexpand.h b/gcc/cfgexpand.h
index 602579d..987cf356 100644
--- a/gcc/cfgexpand.h
+++ b/gcc/cfgexpand.h
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
extern tree gimple_assign_rhs_to_tree (gimple);
extern HOST_WIDE_INT estimated_stack_frame_size (struct cgraph_node *);
+extern bool parm_maybe_byref_p (tree);
extern rtx get_rtl_for_parm_ssa_default_def (tree var);
diff --git a/gcc/function.c b/gcc/function.c
index 390b81e..abbffc5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2955,16 +2955,27 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
if (stack_parm == 0)
{
DECL_ALIGN (parm) = MAX (DECL_ALIGN (parm), BITS_PER_WORD);
- stack_parm = rtl_for_parm (all, parm);
- if (stack_parm)
- stack_parm = copy_rtx (stack_parm);
+ rtx from_expand = rtl_for_parm (all, parm);
+ if (from_expand && (!parm_maybe_byref_p (parm)
+ || XEXP (from_expand, 0) != NULL_RTX))
+ stack_parm = copy_rtx (from_expand);
else
{
stack_parm = assign_stack_local (BLKmode, size_stored,
DECL_ALIGN (parm));
if (GET_MODE_SIZE (GET_MODE (entry_parm)) == size)
PUT_MODE (stack_parm, GET_MODE (entry_parm));
- set_mem_attributes (stack_parm, parm, 1);
+ if (from_expand)
+ {
+ gcc_assert (GET_CODE (stack_parm) == MEM);
+ gcc_assert (GET_CODE (from_expand) == MEM);
+ gcc_assert (XEXP (from_expand, 0) == NULL_RTX);
+ XEXP (from_expand, 0) = XEXP (stack_parm, 0);
+ PUT_MODE (from_expand, GET_MODE (stack_parm));
+ stack_parm = copy_rtx (from_expand);
+ }
+ else
+ set_mem_attributes (stack_parm, parm, 1);
}
}
@@ -3103,24 +3114,34 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tr [...]
= promote_function_mode (data->nominal_type, data->nominal_mode, &unsignedp,
TREE_TYPE (current_function_decl), 2);
- rtx from_expand = rtl_for_parm (all, parm);
+ rtx from_expand = parmreg = rtl_for_parm (all, parm);
- if (from_expand)
+ if (from_expand && !data->passed_pointer)
{
- parmreg = from_expand;
- if (!data->passed_pointer && GET_MODE (parmreg) != promoted_nominal_mode)
+ if (GET_MODE (parmreg) != promoted_nominal_mode)
parmreg = gen_lowpart (promoted_nominal_mode, parmreg);
}
- else
+ else if (!from_expand || parm_maybe_byref_p (parm))
{
parmreg = gen_reg_rtx (promoted_nominal_mode);
if (!DECL_ARTIFICIAL (parm))
mark_user_reg (parmreg);
+
+ if (from_expand)
+ {
+ gcc_assert (data->passed_pointer);
+ gcc_assert (GET_CODE (from_expand) == MEM
+ && GET_MODE (from_expand) == BLKmode
+ && XEXP (from_expand, 0) == NULL_RTX);
+ XEXP (from_expand, 0) = parmreg;
+ }
}
/* If this was an item that we received a pointer to,
set DECL_RTL appropriately. */
- if (!from_expand && data->passed_pointer)
+ if (from_expand)
+ SET_DECL_RTL (parm, from_expand);
+ else if (data->passed_pointer)
{
rtx x = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (data->passed_type)), parmreg);
set_mem_attributes (x, parm, 1);
@@ -3141,8 +3162,7 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
need_conversion = (data->nominal_mode != data->passed_mode
|| promoted_nominal_mode != data->promoted_mode);
- gcc_assert (!(need_conversion && data->passed_pointer));
- moved = from_expand && data->passed_pointer;
+ moved = false;
if (need_conversion
&& GET_MODE_CLASS (data->nominal_mode) == MODE_INT
@@ -3281,15 +3301,12 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tr [...]
if (data->passed_pointer
&& (from_expand || TYPE_MODE (TREE_TYPE (parm)) != BLKmode))
{
- rtx src = DECL_RTL (parm);
-
/* We can't use nominal_mode, because it will have been set to
Pmode above. We must use the actual mode of the parm. */
if (from_expand)
{
+ parmreg = from_expand;
gcc_assert (GET_MODE (parmreg) == TYPE_MODE (TREE_TYPE (parm)));
- src = gen_rtx_MEM (GET_MODE (parmreg), validated_mem);
- set_mem_attributes (src, parm, 1);
}
else if (use_register_for_decl (parm))
{
@@ -3308,14 +3325,14 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tr [...]
set_mem_attributes (parmreg, parm, 1);
}
- if (GET_MODE (parmreg) != GET_MODE (src))
+ if (GET_MODE (parmreg) != GET_MODE (DECL_RTL (parm)))
{
- rtx tempreg = gen_reg_rtx (GET_MODE (src));
+ rtx tempreg = gen_reg_rtx (GET_MODE (DECL_RTL (parm)));
int unsigned_p = TYPE_UNSIGNED (TREE_TYPE (parm));
push_to_sequence2 (all->first_conversion_insn,
all->last_conversion_insn);
- emit_move_insn (tempreg, src);
+ emit_move_insn (tempreg, DECL_RTL (parm));
tempreg = convert_to_mode (GET_MODE (parmreg), tempreg, unsigned_p);
emit_move_insn (parmreg, tempreg);
all->first_conversion_insn = get_insns ();
@@ -3325,20 +3342,9 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
did_conversion = true;
}
else if (GET_MODE (parmreg) == BLKmode)
- {
- push_to_sequence2 (all->first_conversion_insn,
- all->last_conversion_insn);
- gcc_assert (TREE_CODE (data->passed_type) == POINTER_TYPE);
- gcc_assert (TREE_TYPE (data->passed_type) == TREE_TYPE (parm));
- emit_block_move (parmreg, src,
- GEN_INT (int_size_in_bytes (TREE_TYPE (parm))),
- BLOCK_OP_NORMAL);;
- all->first_conversion_insn = get_insns ();
- all->last_conversion_insn = get_last_insn ();
- end_sequence ();
- }
+ gcc_assert (parm_maybe_byref_p (parm));
else
- emit_move_insn (parmreg, src);
+ emit_move_insn (parmreg, DECL_RTL (parm));
SET_DECL_RTL (parm, parmreg);
diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c
index a622728..08ce72c 100644
--- a/gcc/tree-ssa-coalesce.c
+++ b/gcc/tree-ssa-coalesce.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-iterator.h"
#include "tree-ssa-live.h"
#include "tree-ssa-coalesce.h"
+#include "cfgexpand.h"
#include "explow.h"
#include "diagnostic-core.h"
@@ -1379,10 +1380,15 @@ gimple_can_coalesce_p (tree name1, tree name2)
/* Check that the promoted modes are the same. We don't want to
coalesce if the promoted modes would be different. Only
PARM_DECLs and RESULT_DECLs have different promotion rules,
- so skip the test if we both are variables or anonymous
- SSA_NAMEs. */
+ so skip the test if both are variables, or both are anonymous
+ SSA_NAMEs. Now, if a parm or result has BLKmode, do not
+ coalesce its SSA versions with those of any other variables,
+ because it may be passed by reference. */
return ((!var1 || VAR_P (var1)) && (!var2 || VAR_P (var2)))
- || promote_ssa_mode (name1, NULL) == promote_ssa_mode (name2, NULL);
+ || (/* The case var1 == var2 is already covered above. */
+ !parm_maybe_byref_p (var1)
+ && !parm_maybe_byref_p (var2)
+ && promote_ssa_mode (name1, NULL) == promote_ssa_mode (name2, NULL));
}
/* If the types are not the same, check for a canonical type match. This
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.