[code-reflection] RFR: Opening Hat Dialect for Handling Barriers and Shared/Private Memory

Paul Sandoz psandoz at openjdk.org
Thu Sep 18 14:26:47 UTC 2025


On Wed, 10 Sep 2025 11:09:18 GMT, Juan Fumero <jfumero at openjdk.org> wrote:

> This patch creates a new dialect for HAT for handling barriers, local (or shared) memory declaration of types, and private memory declariton. It extends the `Op`s provided by code-reflection with a new `HatOp` the dialect.
> 
> It is enabled by default. 
> 
> TODO: We should move the Hat Config to a common place to be able to use it in the Hat core module, not just in the code gen.

hat/core/src/main/java/hat/dialect/HatBarrierOp.java line 60:

> 58:     @Override
> 59:     public TypeElement resultType() {
> 60:         return typeElement;

Suggestion:

        return JavaType.VOID;

hat/core/src/main/java/hat/dialect/HatOP.java line 35:

> 33: import java.util.List;
> 34: 
> 35: public class HatOP extends Op {

Is this intended to be an abstract class that all hat dialect ops extend from? If you you don't need the `typeElement` field and it does not need to implement `transform` nor `resultType`.

-------------

PR Review Comment: https://git.openjdk.org/babylon/pull/560#discussion_r2337443874
PR Review Comment: https://git.openjdk.org/babylon/pull/560#discussion_r2337450442


More information about the babylon-dev mailing list