public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Coverage of backend rules
@ 2010-05-11 12:35 Paulo J. Matos
  2010-05-11 14:28 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo J. Matos @ 2010-05-11 12:35 UTC (permalink / raw)
  To: gcc

Hi,

I have a backend  and I would like to have a systematic way to know if
my testsuite covers all the define_insn and define_expand rules in my
md file.

What's the best way to achieve this?

I initially thought I could use gcov to check the coverage of the code
that is generated from the md file but I would like to know if there
is any better way to do this since I doubt I am the only one wishing
to do this.

Cheers,
-- 
PMatos

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coverage of backend rules
  2010-05-11 12:35 Coverage of backend rules Paulo J. Matos
@ 2010-05-11 14:28 ` Ian Lance Taylor
  2010-05-12 16:39   ` Paulo J. Matos
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2010-05-11 14:28 UTC (permalink / raw)
  To: Paulo J. Matos; +Cc: gcc

"Paulo J. Matos" <pocmatos@gmail.com> writes:


> I have a backend  and I would like to have a systematic way to know if
> my testsuite covers all the define_insn and define_expand rules in my
> md file.
>
> What's the best way to achieve this?

For define_insn you can use the -da option, and scan the debug files
for the matched insn names.  For define_expand you can reliably use
profiling information to look for calls to gen_NAME.

This approach won't tell you whether you are testing all alternatives
of all define_insns.  I don't know of a reasonable way to do that.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Coverage of backend rules
  2010-05-11 14:28 ` Ian Lance Taylor
@ 2010-05-12 16:39   ` Paulo J. Matos
  0 siblings, 0 replies; 3+ messages in thread
From: Paulo J. Matos @ 2010-05-12 16:39 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

On Tue, May 11, 2010 at 3:26 PM, Ian Lance Taylor <iant@google.com> wrote:

> For define_insn you can use the -da option, and scan the debug files
> for the matched insn names.  For define_expand you can reliably use
> profiling information to look for calls to gen_NAME.
>
> This approach won't tell you whether you are testing all alternatives
> of all define_insns.  I don't know of a reasonable way to do that.
>

Thanks for the tips. I will give it a go at trying to automate this.

Cheers,
-- 
PMatos

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-12 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11 12:35 Coverage of backend rules Paulo J. Matos
2010-05-11 14:28 ` Ian Lance Taylor
2010-05-12 16:39   ` Paulo J. Matos

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).