-
Notifications
You must be signed in to change notification settings - Fork 183
[CIR][Dialect] Add address space attribute to global op #779
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
Conversation
bcardosolopes
left a comment
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.
LGTM. For next PRs: what happens if a global has a type that has a different address space, is that possible?
|
Not sure if I got it! FYI: It seems there are two main aspects here, which are somewhat similar to the alloca address space handling:
Aside from these CIRGen changes, it might be worth considering adding proper verification for |
Got it, so if we write .cl code where
Right, assuming that construct doesn't make sense. |
Actually it will be rejected by Sema. And there is not a "default one", sorry for the confusion here: the method has a parameter
|
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag `addressSpaceInGlobalVar`. The same asm format in pointer type is used: ``` cir.global external addrspace(offload_global) @addrspace1 = #cir.int<1> : !s32i ``` The parsing and printing helper is extracted into a common function to be reused by both `GlobalOp` and `PointerType` with two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType. Lowering to LLVM IR and CIRGen will come sequentially.
This PR adds the CIR address space attribute to GlobalOp and starts to resolve the missing feature flag
addressSpaceInGlobalVar.The same asm format in pointer type is used:
The parsing and printing helper is extracted into a common function to be reused by both
GlobalOpandPointerTypewith two custom format proxy to it. That's because the signature of ODS generated method differs from the one for PointerType.Lowering to LLVM IR and CIRGen will come sequentially.