-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: main
Are you sure you want to change the base?
Conversation
//===----------------------------------------------------------------------===// | ||
// AtAddrOp | ||
//===----------------------------------------------------------------------===// | ||
|
There was a problem hiding this comment.
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
}]> | ||
]; | ||
} | ||
|
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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)> |
There was a problem hiding this comment.
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
Extracted from #265. Added tests