Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LLVM to Affine access pass #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tyb0807
Copy link
Collaborator

@tyb0807 tyb0807 commented Feb 1, 2025

Extracted from #265. Added tests

//===----------------------------------------------------------------------===//
// AtAddrOp
//===----------------------------------------------------------------------===//

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should instead use pointer2memref

}]>
];
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ftynse @ivanradanov
Is this something upstreamable or already upstream

// CHECK-LABEL: func @test_load_store_conversion
// CHECK-SAME: %[[ARG0:.*]]: !llvm.ptr<1>
// CHECK-SAME: %[[ARG1:.*]]: i64
// CHECK: %[[MEMREF:.*]] = "enzymexla.ataddr"(%[[ARG0]]) {{.*}} memref<?xi8, 1>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original load is typed as i64, can we preserve that here instead of doing an vector of i8?

// -----

func.func @test_struct_access(%arg0: !llvm.ptr) {
%ptr = llvm.getelementptr %arg0[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64)>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it is better to apply this pass after converting all of the arguments to memrefs, that way we know the multidimensional sizes and underlying types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants