From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: mark.kettenis@xs4all.nl (Mark Kettenis)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Implement support for IBM XL C for OpenCL vector ABI
Date: Mon, 14 Feb 2011 13:47:00 -0000 [thread overview]
Message-ID: <201102141341.p1EDfMXU026236@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <201102131537.p1DFbvf2004634@glazunov.sibelius.xs4all.nl> from "Mark Kettenis" at Feb 13, 2011 04:37:57 PM
Mark Kettenis wrote:
> I didn't look too closely at the diff yet, but given that
> push_dummy_call() functions tend to be fairly complex already, would
> it be possible to move the OpenCL calling convention into a seperate
> function?
Having a completely separate function at the push_dummy_call level
would lead to significant code duplication, since most of the "regular"
data types are also available in OpenCL C. The new code just adds
support for the special vector types.
I certainly agree that those functions are quite complex already. One
reason for that is that pushing arguments is inherently stateful, and
that state is currently spread out across a significant number of local
variables in the push_dummy_call functions. This makes using subroutines
and helper functions difficult.
It seems one way towards a refactoring of those routines would be to
extract that state into an explicit data structure (along the lines of
CUMULATIVE_ARGS in GCC), and then split handling of different types
of arguments into functions of their own, passing that state around.
If this looks useful, I can work on patch along those lines ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
prev parent reply other threads:[~2011-02-14 13:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 17:48 Ulrich Weigand
2011-02-04 16:47 ` Tom Tromey
2011-02-07 19:25 ` Ulrich Weigand
2011-02-07 20:05 ` Tom Tromey
2011-02-08 13:30 ` Ulrich Weigand
2011-02-14 12:59 ` Luis Machado
2011-02-14 12:07 ` Luis Machado
2011-02-14 13:41 ` Yao Qi
2011-10-24 17:09 ` [commit/powerpc] crash trying to allocate memory in inferior Joel Brobecker
2011-10-26 17:31 ` Ulrich Weigand
2011-10-26 18:16 ` Joel Brobecker
2011-02-13 15:38 ` [rfc] Implement support for IBM XL C for OpenCL vector ABI Mark Kettenis
2011-02-14 13:47 ` Ulrich Weigand [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=201102141341.p1EDfMXU026236@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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