3 Commits

Author SHA1 Message Date
Michael Liao
f259247849 [cir] Fix NYI test after 5925210020b6ff3f3dc48421311eedde82b16d61. NFC
- Output a OMP clause's name instead of its enum.
2025-12-18 12:48:19 -05:00
Erich Keane
1940010e15
[OpenMP][CIR] Implement 'parallel's 'proc_bind' clause lowering (#172501)
This patch implements the 'first' clause for OMP, which is the
'proc_bind' clause. This clause takes one of a handful of values and
just passes it onto the OMP dialect.

The 'default' value for this isn't present in the OMP dialect, however
the classic-codegen doesn't generate the library call when this value is
passed, so this is effectively a 'no-op'.
2025-12-18 06:08:13 -08:00
Erich Keane
5925210020
[OpenMP][CIR] Implement basic 'parallel' lowering + some clause infra (#172308)
This patch adds some basic lowering for the OMP 'parallel' lowering,
which adds an omp.parallel operation, plus tries to insert into its
region, with a omp.terminator operation.. However, this patch doesn't
implement CapturedStmt (and I don't intend to do so at all), so there is
an NYI error when emitting a parallel region (plus it shows up in IR
    as 'empty'.

This patch also adds some infrastructure to 'lower' clauses, however no
clauses are emitted, and this simply adds a 'not yet implemented'
warning any time a clause is attempted. The OMP clause visitor seems to
have had a bug with how it 'degraded' when a clause wasn't handled (it
  would result in an infinite recursion if it wasn't supplied), so this
fixes that as well.

A followup patch or two may use this infrastructure to demonstrate how
to use it.
2025-12-16 07:00:22 -08:00