This revision was automatically updated to reflect the committed changes.
Closed by commit rG6050c156ab4f: [OpenCL] Defer addr space deduction for
dependent type. (authored by Anastasia).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
http
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
___
cfe-commits mailing lis
olestrohm updated this revision to Diff 276369.
olestrohm marked an inline comment as done.
olestrohm added a comment.
I've removed the comments calling for a fix because I no longer feel that this
approach needs that. Given the code that already exists, and without changing
too much of it, addi
Anastasia added inline comments.
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3628
+ // FIXME: This may not be the best approach, as the correct type (including
+ // address space) is available in D, but the type in D may not be reliable
Is this
olestrohm updated this revision to Diff 275381.
olestrohm added a comment.
I have added a check in `deduceOpenCLAddressSpace()` to check if the type is
dependent, and not deduce the address space if it is. This is a big change in
the behaviour of address space deduction, meaning that template va
olestrohm updated this revision to Diff 275351.
olestrohm added a comment.
Disregard the last comment, rolling back that diff for now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
Files:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clan
olestrohm updated this revision to Diff 275345.
olestrohm added a comment.
Added a guard in deduceOpenCLAddressSpace to stop it from deducing address
space for dependent types, as requested.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
Files
rjmccall added a comment.
Seems like you shouldn't do it earlier if the type is dependent.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82781/new/
https://reviews.llvm.org/D82781
___
cfe-commits maili
olestrohm added a comment.
Essentially, in each pass the type for the variable starts off being extract
from the SourceTypeInfo, but since the address space isn't specified, this type
is then missing an address space.
Adding the address space deduction then reintroduces the address space to the
Anastasia added a comment.
So if I understand this correctly when the template is instantiated we don't
have `QualType` with the address space deduced initially during parsing of a
template global variable?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm
olestrohm created this revision.
olestrohm added reviewers: Anastasia, rjmccall.
olestrohm added a project: clang.
Herald added a subscriber: yaxunl.
This patch fixes two instances of not deducing address spaces for global
template variables.
I've added OpenCL address space deduction to the funct
11 matches
Mail list logo