From: Greg McGary <gkm@eng.ascend.com>
To: Joern Rennecke <amylaar@cygnus.co.uk>
Cc: gcc@gcc.gnu.org
Subject: Re: Need advice on bounds checking approaches
Date: Fri, 24 Mar 2000 12:28:00 -0000 [thread overview]
Message-ID: <msitycyuyg.fsf@gkm-dsl-194.ascend.com> (raw)
In-Reply-To: <200003242007.UAA14155@phal.cygnus.co.uk>
Joern Rennecke <amylaar@cygnus.co.uk> writes:
> > Question: with the above plan, is there a way to provide a default
> > expansion of the "check_bounds" pattern into primitive RTL
> > (comparisons, conditional branches and call to abort) for those
> > targets that don't define an insn for "check_bounds"?
>
> You can use HAVE_check_bounds to test if a "check_bounds" pattern has been
> defined in the md file. If it is defined, you can use gen_check_bounds
> to generate this pattern. The expander might fail (e.g. because the
> target can implement the bounds checking insn only for a particular
> cpu_, in which case you get a zero return value from gen_check_bounds.
I am aware of HAVE_check_bounds. Unfortunately, it doesn't do what I
want. If HAVE_check_bounds, I could generate "check_bounds", and if
! HAVE_check_bounds, I could generate the primitive RTL (compares +
conditional branches + abort). If ! HAVE_check_bounds, then I lose
the ability to conveniently optimize away redundant checks, and my
basic blocks get sliced up by the presence of extra branches.
What I want is to always generate check_bounds insns, always optimize
away redundant checks the same way, and then provide a default
*expansion* if the MD doesn't define one.
Is that feasible, or am I dreaming?
Greg
next prev parent reply other threads:[~2000-03-24 12:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-24 11:18 Greg McGary
2000-03-24 12:08 ` Joern Rennecke
2000-03-24 12:28 ` Greg McGary [this message]
2000-03-24 16:18 ` Jeffrey A Law
2000-03-24 16:50 ` Greg McGary
2000-03-24 17:27 ` Jamie Lokier
2000-03-27 12:30 ` Jeffrey A Law
2000-03-27 12:45 ` Mark Mitchell
2000-03-27 13:05 ` Greg McGary
2000-03-27 13:54 ` Geoff Keating
2000-03-27 14:21 ` Greg McGary
2000-03-27 14:30 ` Jeffrey A Law
2000-03-27 19:23 ` Michael Hayes
2000-03-27 14:34 ` Geoff Keating
2000-03-27 22:07 ` Greg McGary
2000-03-28 1:55 ` Richard Henderson
2000-03-28 7:05 ` Jeffrey A Law
2000-03-28 9:28 ` Greg McGary
2000-03-28 9:48 ` Jeffrey A Law
2000-03-28 11:30 ` Geoff Keating
2000-03-28 12:26 ` Greg McGary
2000-03-28 12:30 ` Geoff Keating
2000-03-28 12:59 ` Greg McGary
2000-03-28 13:12 ` Greg McGary
2000-03-29 10:17 ` Joe Buck
2000-03-28 13:41 ` Alan Lehotsky
2000-03-28 14:25 ` Greg McGary
2001-09-04 23:52 ` Tom Tromey
2000-03-28 14:21 ` Greg McGary
2000-03-28 9:57 ` Joern Rennecke
2000-03-29 12:22 ` Jeffrey A Law
2000-03-29 13:35 ` Geoff Keating
2000-04-07 9:57 ` Greg McGary
2000-04-09 11:01 ` Jeffrey A Law
2000-04-09 11:38 ` Greg McGary
2000-04-10 10:13 ` Jeffrey A Law
2000-04-09 16:26 ` Greg McGary
2000-04-10 10:20 ` Jeffrey A Law
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=msitycyuyg.fsf@gkm-dsl-194.ascend.com \
--to=gkm@eng.ascend.com \
--cc=amylaar@cygnus.co.uk \
--cc=gcc@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).