public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bonzini at gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66790] Invalid uninitialized register handling in REE
Date: Tue, 22 Sep 2015 08:40:00 -0000	[thread overview]
Message-ID: <bug-66790-4-5IlVqX4x4g@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66790-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790

--- Comment #29 from Paolo Bonzini <bonzini at gnu dot org> ---
> While getting familiar with DF problems, I noticed that LIVE's ignores
> the order of GENs and KILLs in basic blocks. In other words, the
> transfer function for: GEN(r1); KILL(r1) is currently the same as for
> KILL(r1); GEN(r1) whereas clearly the former leaves r1 unitialized
> whereas the latter leaves it initialized.

GEN and KILL are not the same for LR and MIR.

1) Sets and clobbers are handled differently.  A set or clobber of r1 _kills_
liveness, while for MIR sets _generate_ "initialized-ness" and only clobbers
kill it.

2) A use of r1 _creates_ liveness (which extends up, until it reaches the sets
for all reaching definitions of that use), while uses of r1 are irrelevant for
MIR.

3) For LR, GEN must override KILL if an insn has both a set and a use of r1. 
For MIR, you cannot have a GEN (set) and a KILL (clobber) in the same insn.

BTW, are you sure that

+      if (DF_REF_FLAGS_IS_SET (def,
+                              DF_REF_PARTIAL | DF_REF_CONDITIONAL))
+       /* All partial or conditional def
+          seen are included in the gen set. */
+       bitmap_set_bit (gen, regno);

?  I would have thought they don't belong in any set, and on the contrary I
would have thought that may-clobber definitions count as kills.


  parent reply	other threads:[~2015-09-22  8:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 16:05 [Bug rtl-optimization/66790] New: " derodat at adacore dot com
2015-07-07 16:06 ` [Bug rtl-optimization/66790] " derodat at adacore dot com
2015-07-07 16:06 ` derodat at adacore dot com
2015-07-07 16:06 ` derodat at adacore dot com
2015-07-29 13:06 ` rguenth at gcc dot gnu.org
2015-07-30  9:54 ` derodat at adacore dot com
2015-07-31  8:17 ` derodat at adacore dot com
2015-07-31  8:18 ` derodat at adacore dot com
2015-09-10 14:16 ` ebotcazou at gcc dot gnu.org
2015-09-10 14:26 ` derodat at adacore dot com
2015-09-10 14:40 ` ebotcazou at gcc dot gnu.org
2015-09-10 14:44 ` derodat at adacore dot com
2015-09-16 11:45 ` bernds at gcc dot gnu.org
2015-09-16 17:52 ` ebotcazou at gcc dot gnu.org
2015-09-16 22:54 ` bernds at gcc dot gnu.org
2015-09-17 10:21 ` ebotcazou at gcc dot gnu.org
2015-09-17 10:39 ` bernds at gcc dot gnu.org
2015-09-17 11:27 ` bonzini at gnu dot org
2015-09-17 12:52 ` zadeck at naturalbridge dot com
2015-09-17 12:53 ` ebotcazou at gcc dot gnu.org
2015-09-17 14:41 ` zadeck at naturalbridge dot com
2015-09-17 15:36 ` ebotcazou at gcc dot gnu.org
2015-09-17 15:36 ` ebotcazou at gcc dot gnu.org
2015-09-17 15:36 ` ebotcazou at gcc dot gnu.org
2015-09-21 16:32 ` derodat at adacore dot com
2015-09-21 17:04 ` bernds at gcc dot gnu.org
2015-09-22  8:40 ` bonzini at gnu dot org [this message]
2015-09-22  9:03 ` ebotcazou at gcc dot gnu.org
2015-09-22  9:14 ` bonzini at gnu dot org
2015-09-23 10:04 ` derodat at adacore dot com
2015-09-23 10:05 ` derodat at adacore dot com
2015-09-23 10:23 ` bonzini at gnu dot org
2015-09-23 10:25 ` bernds at gcc dot gnu.org
2015-09-23 10:26 ` bonzini at gnu dot org
2015-09-24  7:42 ` derodat at adacore dot com
2015-10-01  5:44 ` derodat at adacore dot com
2015-10-03 10:45 ` bernds at gcc dot gnu.org
2015-10-12 14:47 ` derodat at adacore dot com
2015-10-19 23:48 ` pmderodat at gcc dot gnu.org

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=bug-66790-4-5IlVqX4x4g@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).