-
Notifications
You must be signed in to change notification settings - Fork 104
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
[CIR][CIRGen][LowerToLLVM] Add address space attribute for pointer type #606
Conversation
78b09d3
to
6229950
Compare
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.
Neat!
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.
Thanks for working on this. Seems almost good, some nits, just fix them and I'll merge
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.
Looks great. In the future please make sure you update the PR description to only reflect what's currently done in the PR + no need to state what changed between commits because I squash them before merging.
…pe (llvm#606) This is the prelude of address space support. Linked issue: llvm#418 . - Add the attribute and implement asm format & type conversion. - Make ops like `cir.global` and `cir.get_global` aware of address space, and solve the latter flag. - Relax the restriction of default alloca address space. Then we can use correct address spaces for languages like OpenCL in future.
…pe (llvm#606) This is the prelude of address space support. Linked issue: llvm#418 . - Add the attribute and implement asm format & type conversion. - Make ops like `cir.global` and `cir.get_global` aware of address space, and solve the latter flag. - Relax the restriction of default alloca address space. Then we can use correct address spaces for languages like OpenCL in future.
…pe (llvm#606) This is the prelude of address space support. Linked issue: llvm#418 . - Add the attribute and implement asm format & type conversion. - Make ops like `cir.global` and `cir.get_global` aware of address space, and solve the latter flag. - Relax the restriction of default alloca address space. Then we can use correct address spaces for languages like OpenCL in future.
…pe (#606) This is the prelude of address space support. Linked issue: #418 . - Add the attribute and implement asm format & type conversion. - Make ops like `cir.global` and `cir.get_global` aware of address space, and solve the latter flag. - Relax the restriction of default alloca address space. Then we can use correct address spaces for languages like OpenCL in future.
This is the prelude of address space support. Linked issue: #418 .
I want to solve it by these steps:
addressSpaceCasting
and (existing)addressSpaceInGlobalVar
clang::CK_AddressSpaceConversion
as a new kind ofcir.cast
. Also fix the corresponding occurrences.cir.global
andcir.get_global
aware of address space, and solve the latter flag.Revert to this PR itself, which includes:
cir.ptr<T[, $addrspace]>
cir.ptr<T[, addrspace($addrspace)]>
addrspace = 0
extendedskipDefaultBuilders = 1
, tell me if it's not a good practice😉AST -> CIR -> LLVM
pipeline