public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Alexander Monakov <amonakov@ispras.ru>,
	gcc-patches@gcc.gnu.org, Bernd Schmidt <bschmidt@redhat.com>,
	Dmitry Melnik <dm@ispras.ru>,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [gomp-nvptx 2/9] nvptx backend: new "uniform SIMT" codegen variant
Date: Wed, 02 Dec 2015 13:39:00 -0000	[thread overview]
Message-ID: <565EF470.3050400@acm.org> (raw)
In-Reply-To: <20151202131013.GL5675@tucnak.redhat.com>

On 12/02/15 08:10, Jakub Jelinek wrote:
> On Wed, Dec 02, 2015 at 08:02:47AM -0500, Nathan Sidwell wrote:

> Always the whole stack, from the current stack pointer up to top of the
> stack, so sometimes a few bytes, sometimes a few kilobytes or more each time?

The frame of the current function.  Not the whole stack.  As I said, there's no 
visibility of the stack beyond the current function.  (one could implement some 
kind of chaining, I guess)

PTX does not expose the concept of a stack at all.  No stack pointer, no link 
register, no argument pushing.

It does expose 'local' memory, which is private to a thread and only live during 
a function (not like function-scope 'static').  From that we construct stack frames.

The rules of PTX are such that one can (almost) determine the call graph 
statically.  I don't know whether the JIT implements .local as a stack or 
statically allocates it (and perhaps uses a liveness algorithm to determine 
which pieces may overlap).  Perhaps it depends on the physical device capabilities.

The 'almost' fails with indirect calls, except that
1) at an indirect call, you may specify the static set of fns you know it'll 
resolve to
2) if you don't know that, you have to specify the function prototype anyway. 
So the static set would be 'all functions of that type'.

I don't know if the JIT makes use of that information.

nathan

  reply	other threads:[~2015-12-02 13:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 15:28 [gomp-nvptx 0/9] Codegen bits for NVPTX OpenMP SIMD Alexander Monakov
2015-12-01 15:28 ` [gomp-nvptx 8/9] libgomp: update gomp_nvptx_main for -mgomp Alexander Monakov
2015-12-01 15:56   ` Bernd Schmidt
2015-12-02 11:02   ` Jakub Jelinek
2015-12-01 15:28 ` [gomp-nvptx 4/9] nvptx backend: add -mgomp option and multilib Alexander Monakov
2015-12-02 10:56   ` Jakub Jelinek
2015-12-02 14:18     ` Alexander Monakov
2015-12-03 10:42     ` Alexander Monakov
2015-12-01 15:28 ` [gomp-nvptx 2/9] nvptx backend: new "uniform SIMT" codegen variant Alexander Monakov
2015-12-01 16:02   ` Bernd Schmidt
2015-12-01 16:20     ` Alexander Monakov
2015-12-07 15:09     ` Nathan Sidwell
2015-12-02 10:40   ` Jakub Jelinek
2015-12-02 13:02     ` Nathan Sidwell
2015-12-02 13:10       ` Jakub Jelinek
2015-12-02 13:39         ` Nathan Sidwell [this message]
2015-12-02 13:46           ` Jakub Jelinek
2015-12-02 14:00             ` Bernd Schmidt
2015-12-02 14:14             ` Nathan Sidwell
2015-12-02 14:22               ` Jakub Jelinek
2015-12-02 14:23                 ` Nathan Sidwell
2015-12-02 14:24                   ` Jakub Jelinek
2015-12-02 14:34                     ` Alexander Monakov
2015-12-02 14:39                     ` Nathan Sidwell
2015-12-02 14:54         ` Alexander Monakov
2015-12-02 15:12           ` Jakub Jelinek
2015-12-02 15:18             ` Nathan Sidwell
     [not found]             ` <CABtfrpAyUtWub2CBHKYqN0aLNTZ1QspmxyQzOU6Gr+3ogZpSNA@mail.gmail.com>
2015-12-02 16:36               ` Jakub Jelinek
2015-12-02 17:09                 ` Nathan Sidwell
2015-12-02 17:09                 ` Alexander Monakov
2015-12-02 17:20                   ` Nathan Sidwell
2015-12-03 13:57                     ` Alexander Monakov
2015-12-02 14:41       ` Alexander Monakov
2015-12-02 14:43         ` Nathan Sidwell
2015-12-01 15:28 ` [gomp-nvptx 5/9] new target hook: TARGET_SIMT_VF Alexander Monakov
2015-12-01 15:28 ` [gomp-nvptx 9/9] adjust SIMD loop lowering for SIMT targets Alexander Monakov
2015-12-01 22:40   ` Alexander Monakov
2015-12-02 11:48   ` Jakub Jelinek
2015-12-02 13:54     ` Alexander Monakov
2015-12-02 14:02       ` Jakub Jelinek
2015-12-02 14:26         ` Alexander Monakov
2015-12-01 15:28 ` [gomp-nvptx 6/9] nvptx libgcc: rewrite in C Alexander Monakov
2015-12-01 23:52   ` Bernd Schmidt
2015-12-02  0:23     ` Alexander Monakov
2015-12-07 15:13     ` Nathan Sidwell
2015-12-01 15:28 ` [gomp-nvptx 7/9] nvptx mkoffload: pass -mgomp for OpenMP offloading Alexander Monakov
2015-12-01 15:46 ` [gomp-nvptx 3/9] nvptx backend: add two more identifier maps Alexander Monakov
2015-12-01 15:47 ` [gomp-nvptx 1/9] nvptx backend: allow emitting COND_EXEC insns Alexander Monakov
2015-12-02 13:31   ` Bernd Schmidt

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=565EF470.3050400@acm.org \
    --to=nathan@acm.org \
    --cc=amonakov@ispras.ru \
    --cc=bschmidt@redhat.com \
    --cc=dm@ispras.ru \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.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).