From: Paulo Matos <paulo@matos-sorge.com>
To: Antoine Pelisse <apelisse@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>,
git-owner@vger.kernel.org
Subject: Re: Unexpected cherry-pick behaviour
Date: Wed, 11 Dec 2013 11:19:34 +0000 [thread overview]
Message-ID: <beee32a53ece8b839578703deb851eaa@matos-sorge.com> (raw)
In-Reply-To: <CALWbr2zPPnDiv7oVBhnM9dSW=pfz2jUA_A5u_gk2ttgXTStvkw@mail.gmail.com>
On 11/12/2013 11:09, Antoine Pelisse wrote:
>>
>> I don't know how to interpret the fact that the line you sent (with
>> the
>> obvious --conflicts being --conflict) outputs nothing...
>
> That is expected. git-checkout with this option [1] will reset the
> conflict on gcc/tree-ssa-threadedge.c file to the initial conflict
> state, and use the diff3 markers. You should have a new look at that
> file as you will now be able to see the "ancestor" in the conflict.
>
> [1] You can have a look either at git-checkout manpage or here:
> http://git-scm.com/docs/git-checkout, especially --merge and
> --conflict options.
> --
Got it, but still not helpful as git is still modifying code out of the
conflicting zone.
$ git checkout --conflict=diff3 tree-ssa-threadedge.c
$ git diff tree-ssa-threadedge.c
diff --cc gcc/tree-ssa-threadedge.c
index cb6accf,f022eed..0000000
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@@ -936,34 -854,33 +936,57 @@@ thread_around_empty_blocks (edge taken_
STACK is used to undo temporary equivalences created during the
walk of
E->dest.
- SIMPLIFY is a pass-specific function used to simplify statements.
*/
-
-void
-thread_across_edge (gimple dummy_cond,
- edge e,
- bool handle_dominating_asserts,
- vec<tree> *stack,
- tree (*simplify) (gimple, gimple))
-{
- gimple stmt;
+ SIMPLIFY is a pass-specific function used to simplify statements.
++<<<<<<< ours
+ Our caller is responsible for restoring the state of the expression
+ and const_and_copies stacks. */
++||||||| base
++ /* If E is a backedge, then we want to verify that the COND_EXPR,
++ SWITCH_EXPR or GOTO_EXPR at the end of e->dest is not affected
++ by any statements in e->dest. If it is affected, then it is not
++ safe to thread this edge. */
++ if (e->flags & EDGE_DFS_BACK)
++ {
++ if (cond_arg_set_in_bb (e, e->dest))
++ goto fail;
++ }
++=======
+ /* If E is a backedge, then we want to verify that the COND_EXPR,
+ SWITCH_EXPR or GOTO_EXPR at the end of e->dest is not affected
+ by any statements in e->dest. If it is affected, then it is not
+ safe to thread this edge. */
+ if (e->flags & EDGE_DFS_BACK)
+ {
+ if (cond_arg_set_in_bb (e, e->dest))
+ goto fail;
+ }
+ myport_hook ()
++>>>>>>> theirs
- stmt_count = 0;
+static bool
+thread_through_normal_block (edge e,
+ gimple dummy_cond,
+ bool handle_dominating_asserts,
+ vec<tree> *stack,
+ tree (*simplify) (gimple, gimple),
+ vec<jump_thread_edge *> *path,
+ bitmap visited,
+ bool *backedge_seen_p,
+ bitmap src_map,
+ bitmap dst_map)
+{
+ /* If we have traversed a backedge, then we do not want to look
+ at certain expressions in the table that can not be relied upon.
+ Luckily the only code that looked at those expressions is the
+ SIMPLIFY callback, which we replace if we can no longer use it.
*/
+ if (*backedge_seen_p)
+ simplify = dummy_simplify;
/* PHIs create temporary equivalences. */
- if (!record_temporary_equivalences_from_phis (e, stack))
- goto fail;
+ if (!record_temporary_equivalences_from_phis (e, stack,
*backedge_seen_p,
+ src_map, dst_map))
+ return false;
/* Now walk each statement recording any context sensitive
temporary equivalences we can detect. */
--
Paulo Matos
next prev parent reply other threads:[~2013-12-11 11:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 11:04 Unexpected cherry-pick behaviour Paulo Matos
2013-12-10 19:34 ` Junio C Hamano
2013-12-11 10:04 ` Paulo Matos
2013-12-11 11:09 ` Antoine Pelisse
2013-12-11 11:19 ` Paulo Matos [this message]
2013-12-14 9:40 ` Antoine Pelisse
2013-12-14 14:53 ` Philip Oakley
2013-12-14 19:39 ` Junio C Hamano
2013-12-15 14:48 ` Philip Oakley
2013-12-16 19:00 ` Philip Oakley
2013-12-16 20:15 ` Junio C Hamano
2013-12-14 19:33 ` Junio C Hamano
2013-12-14 19:47 ` Antoine Pelisse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=beee32a53ece8b839578703deb851eaa@matos-sorge.com \
--to=paulo@matos-sorge.com \
--cc=apelisse@gmail.com \
--cc=git-owner@vger.kernel.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).