8 Commits

Author SHA1 Message Date
erichkeane
553fa204ed [OpenACC] Implement 'at least one of' restriction for 'update'
This completes the implementation of 'update' by implementing its last
restriction. This restriction requires at least 1 of the 'self', 'host',
  or 'device' clauses.
2025-01-09 09:28:58 -08:00
erichkeane
be32621ce8 [OpenACC] Implement 'device' and 'host' clauses for 'update'
These two clauses just take a 'var-list' and specify where the variables
should be copied from/to.  This patch implements the AST nodes for them
and ensures they properly take a var-list.
2025-01-09 09:28:58 -08:00
erichkeane
891481ed82 [OpenACC] Add missing 'check' line to update-construct-ast test.
I must have deleted this by accident, and my local run's address managed
to have a '1' in the address, so it didn't catch it!  This corrects the
test.
2025-01-08 13:35:14 -08:00
erichkeane
2c2accbcc6 [OpenACC] Enable 'self' sema for 'update' construct
The 'self' clause is an unfortunately difficult one, as it has a
significantly different meaning between 'update' and the other
constructs.  This patch introduces a way for the 'self' clause to work
as both.  I considered making this two separate AST nodes (one for
'self' on 'update' and one for the others), however this makes the
automated macros/etc for supporting a clause break.

Instead, 'self' has the ability to act as either a condition or as a
var-list clause.  As this is the only one of its kind, it is implemented
all within it.  If in the future we have more that work like this, we
should consider rewriting a lot of the macros that we use to make
clauses work, and make them separate ast nodes.
2025-01-08 13:19:33 -08:00
erichkeane
666eee0ef8 [OpenACC] enable 'device_type' for the 'update' construct
This has a similar restriction to 'set' in that only 'async' and 'wait'
are disallowed, so this implements that restriction and enables
'device_type'.
2025-01-07 11:25:58 -08:00
erichkeane
e2c1b1fed4 [OpenACC] enable 'async' and 'wait' for 'update' construct
These work the same here as they do for every other construct, so this
is as simple as enabling them and writing tests, which this patch does.
2025-01-07 10:23:50 -08:00
erichkeane
dd1e8aa09c [OpenACC] Enable 'if' and 'if_present' for 'update' construct
The only restriction on 'if' is that only 1 can appear on an update
construct, so this enforces that.  'if_present' has no restrictions.
2025-01-07 08:20:20 -08:00
erichkeane
db81e8c42e [OpenACC] Initial sema implementation of 'update' construct
This executable construct has a larger list of clauses than some of the
others, plus has some additional restrictions.  This patch implements
the AST node, plus the 'cannot be the body of a if, while, do, switch,
    or label' statement restriction.  Future patches will handle the
    rest of the restrictions, which are based on clauses.
2025-01-07 08:20:20 -08:00