public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: Jim Meyering <jim@meyering.net>, gcc-patches@gcc.gnu.org
Subject: Re: avoid useless if-before-free tests
Date: Wed, 09 Mar 2011 09:39:00 -0000	[thread overview]
Message-ID: <AANLkTimTi9KB12U5kQ5pk313KPSbQNd3UVrwLhcB5+ze@mail.gmail.com> (raw)
In-Reply-To: <4D765A9E.4070005@redhat.com>

On Tue, Mar 8, 2011 at 5:34 PM, Jeff Law <law@redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/05/11 07:05, Jim Meyering wrote:
>> Hello,
>>
>> Someone asked me about this yesterday, and since I've been carrying
>> this patch series for over a year -- it's not high priority --
>> this seems like a good time finally to post it.
>>
>> I've been removing if-before-free tests for a few years now.
>> Here are some of the projects that have endured this janitorial work:
> You know, it probably wouldn't be that hard to have GCC perform this
> analysis for you using its dataflow framework.  Checking for a free call
> which is dominated by a test if the argument is null would be a pretty
> simple check.

Yeah, I did this for the malloc hoisting patches first but then settled
on changing the Fortran frontend to not emit a NULL test (which it still
does, the patches were not merged).

Richard.

> Jeff
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJNdlqeAAoJEBRtltQi2kC746gIAImSP5BZAQ/d9wF94EQcBsWQ
> Qo4hn+LK6G2h5R2yVwB9dMf4CTZygxnowlFTxtG9QXMlzMCQp61jHJNLJLpgY4Qz
> HLMjPGS8uMUa28pJkeRU0ZIMy5hDGID24F0FChnrpNalBnlCvP0xXsnZEcXi8Ei2
> 3VkOMx87MAnVT0k7omZSnMy2HeKqmnP9xQMGM+ISEAFJuiGYeb5Os3T7IRprJjia
> DSOjSF20O8TTV6543pUrMvdzrEYtTTmsv1UKejiyGMDpHrs2qNHsyqiFBO/FLGLA
> bdNplowv5xTTrlPy/4zYXewvl3XLr8okrk8/c0Y4dIKq/g5jIB6pYVXilGSOVa0=
> =WHAM
> -----END PGP SIGNATURE-----
>

      reply	other threads:[~2011-03-09  9:39 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05 14:06 Jim Meyering
2011-03-05 19:16 ` Joseph S. Myers
2011-03-07 19:52   ` Dr Andrew John Hughes
2011-03-07 22:47     ` Joseph S. Myers
2011-03-08 16:57       ` Dr Andrew John Hughes
2011-03-08 17:17         ` Jim Meyering
2011-03-08 10:45   ` Jim Meyering
2011-03-08 14:21   ` [PATCH v2] " Jim Meyering
2011-03-08 14:30     ` Rainer Orth
2011-03-08 15:28       ` Ian Lance Taylor
2011-03-08 15:36         ` Jakub Jelinek
2011-03-08 17:03       ` Jim Meyering
2011-03-08 18:45         ` Rainer Orth
2011-03-08 19:13           ` Jim Meyering
2011-03-08 19:20             ` Rainer Orth
2011-03-08 19:39               ` Jakub Jelinek
2011-03-08 17:54     ` [PATCH v3] " Jim Meyering
2011-03-08 19:34       ` DJ Delorie
2011-03-15  9:19       ` Janne Blomqvist
2011-03-15 10:03         ` [PATCH gcc/fortran] get rid of gfc_free Jim Meyering
2011-03-15 10:08           ` Jakub Jelinek
2011-03-15 10:27             ` Jim Meyering
2011-03-15 14:18           ` Janne Blomqvist
2011-03-15 18:21             ` Jim Meyering
2011-03-24 16:51         ` [PATCH v3] Re: avoid useless if-before-free tests Jim Meyering
2011-04-15  7:54           ` Janne Blomqvist
2011-04-15  8:18             ` Jim Meyering
2011-04-15  8:48               ` Janne Blomqvist
2011-04-15  8:56                 ` Jim Meyering
2011-04-15 13:23                 ` Tom Tromey
2011-04-15 18:12                   ` Jim Meyering
2011-04-18 15:33             ` Jim Meyering
2011-04-18 16:32               ` Janne Blomqvist
2011-04-18 16:39                 ` Jim Meyering
2011-04-18 19:59                 ` Jim Meyering
2011-04-18 20:37                 ` [PATCH v4] " Jim Meyering
2011-04-18 20:42                   ` Tom Tromey
2011-04-18 20:43                     ` Jim Meyering
2011-04-19 13:00                 ` [PATCH v3] " Michael Matz
2011-04-19 16:04                   ` Jim Meyering
2011-03-05 19:19 ` Joseph S. Myers
2011-03-07 22:56 ` Paolo Carlini
2011-03-08 16:34 ` Jeff Law
2011-03-09  9:39   ` Richard Guenther [this message]

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=AANLkTimTi9KB12U5kQ5pk313KPSbQNd3UVrwLhcB5+ze@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jim@meyering.net \
    --cc=law@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).