yaxunl added a comment.
Is this a feature requested by users?
I can understand that this may be useful to pinpoint some conversions which are
potentially harmful to performance. However such conversions can often be
eliminated by optimization, which makes this warning less useful.
On the other
yaxunl added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8584
+ "passing non-generic address space pointer to %0"
+ " generates dynamic conversion where it is not needed">;
How about change this to:
may cause dynamic conversion af
yaxunl added a comment.
In https://reviews.llvm.org/D43783#1215573, @Anastasia wrote:
> In https://reviews.llvm.org/D43783#1212485, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D43783#1204353, @svenvh wrote:
> >
> > > Sorry for digging up an old commit...
> > >
> > > Apparently this broke blo
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: t-tye, tpr, dstuttard, wdng, kzhuravl.
AMDGPU backend needs -amdgpu-internalize-symbols option for opt to
work around a limitation of no PLT support, otherwise there is compilation
error at -O0.
https://reviews
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a subscriber: krytarowski.
Clang predefine macro `__linx__` for aux-triple with Linux OS
but does not predefine macro `__gnu_linux__`. This causes
some compilation error for certain applications, e.g. Eigen.
This patch fixes
yaxunl added a comment.
In https://reviews.llvm.org/D51434#1217772, @tra wrote:
> Could you elaborate on what exactly is the problem this patch fixes?
> I don't see how internalizing the symbols connects to PLTs. My understanding
> is that PLTs are used to provide stubs for symbols to be resolv
yaxunl updated this revision to Diff 163145.
yaxunl added a comment.
Revised by Artem's comments.
https://reviews.llvm.org/D51441
Files:
lib/Frontend/InitPreprocessor.cpp
test/Preprocessor/predefined-macros.c
Index: test/Preprocessor/predefined-macros.c
===
yaxunl added a comment.
In https://reviews.llvm.org/D51434#1217971, @arsenm wrote:
> https://reviews.llvm.org/D51209 is the patch. I think HIP will need an
> additional patch, since I think it isn’t subclassing the amdgpu toolchain
Yes since HIP has different toolchain. This does not affect ke
yaxunl added a comment.
In https://reviews.llvm.org/D51441#1218010, @tra wrote:
> While we're here, perhaps `Builder.defineMacro("__linux__")` should be
> changed to `DefineStd("linux")` which defines `linux/__linux/__linux__`?
Will do when committing. Thanks.
https://reviews.llvm.org/D51441
yaxunl added a comment.
In https://reviews.llvm.org/D51441#1218034, @yaxunl wrote:
> In https://reviews.llvm.org/D51441#1218010, @tra wrote:
>
> > While we're here, perhaps `Builder.defineMacro("__linux__")` should be
> > changed to `DefineStd("linux")` which defines `linux/__linux/__linux__`?
>
This revision was automatically updated to reflect the committed changes.
Closed by commit rC340967: Add predefined macro __gnu_linux__ for proper
aux-triple (authored by yaxunl, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D51441
Files:
lib/Frontend/InitPreprocessor.cpp
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
https://reviews.llvm.org/D51209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
yaxunl updated this revision to Diff 163186.
yaxunl retitled this revision from "[HIP] Add -amdgpu-internalize-symbols
option to opt" to "[HIP] Add -fvisibility hidden option to clang".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Use -fvisibility hidden.
https://reviews.
yaxunl updated this revision to Diff 163196.
yaxunl added a comment.
Revised by Artem's comments.
https://reviews.llvm.org/D51434
Files:
lib/Driver/ToolChains/HIP.cpp
test/Driver/hip-toolchain.hip
Index: test/Driver/hip-toolchain.hip
===
yaxunl added inline comments.
Comment at: lib/Driver/ToolChains/HIP.cpp:256
+CC1Args.append({"-fvisibility", "hidden"});
}
arsenm wrote:
> We should probably start subclassing the HIP toolchain from AMDGPU and share
> more of this
I'd like to defer the re
yaxunl added inline comments.
Comment at: lib/Driver/ToolChains/HIP.cpp:256
+CC1Args.append({"-fvisibility", "hidden"});
}
arsenm wrote:
> arsenm wrote:
> > yaxunl wrote:
> > > arsenm wrote:
> > > > We should probably start subclassing the HIP toolchain fr
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341077: [HIP] Add -fvisibility hidden option to clang
(authored by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51434?vs=163196&id=
yaxunl added a comment.
In https://reviews.llvm.org/D51411#1224615, @Anastasia wrote:
> In https://reviews.llvm.org/D51411#1217477, @yaxunl wrote:
>
> > Is this a feature requested by users?
> >
> > I can understand that this may be useful to pinpoint some conversions which
> > are potentially h
yaxunl created this revision.
yaxunl added a reviewer: tra.
ShouldDeleteSpecialMember is called upon inherited constructors.
It calls inferCUDATargetForImplicitSpecialMember, which in turn
calls LookupSpecialMember.
LookupSpecialMember expects ConstArg==false for
CXXDefaultConstructor. For inheri
yaxunl added a comment.
In https://reviews.llvm.org/D43783#1235090, @Anastasia wrote:
> Ping! Do you still plan to do this? :)
Sorry I caught up in something else. Since there are some subsequent commits,
it may take some efforts to revert it.
Repository:
rC Clang
https://reviews.llvm.org
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:444
+auto HandleValue =
+CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign());
+llvm::Constant *Zero =
llvm::Constant::getNullValue(Handle
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:3150
+ !getLangOpts().OpenCLCPlusPlus)
+return false;
+
rjmccall wrote:
> yaxunl wrote:
> > rjmccall wrote:
> > > It's not really OpenCL C++ that
yaxunl marked 5 inline comments as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:444
+auto HandleValue =
+CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign());
+llvm::Constant *Zero =
llvm::Constant::getNullValue(Handle
yaxunl updated this revision to Diff 156383.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D49083
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenCUDA/device-stub.cu
=
yaxunl updated this revision to Diff 156403.
yaxunl marked 5 inline comments as done.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D49294
Files:
lib/Sema/SemaCast.cpp
lib/Sema/SemaOverload.cpp
test/CodeGenCXX/address-space-cast.cpp
Index: test/CodeGenCXX/
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGCUDANV.cpp:578
+ DtorBuilder.CreateStore(Zero, GpuBinaryAddr);
+ DtorBuilder.CreateBr(ExitBlock);
+DtorBuilder.SetInsertPoint(ExitBlock);
rjmccall wrote
yaxunl updated this revision to Diff 156424.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D49083
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenCUDA/device-stub.cu
=
This revision was automatically updated to reflect the committed changes.
Closed by commit rL337540: Sema: Fix explicit address space cast in C++
(authored by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D49294?vs=156403&id=1
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337631: [HIP] Register/unregister device fat binary only
once (authored by yaxunl, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D49083
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGen
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337639: [HIP] Support -fcuda-flush-denormals-to-zero for
amdgcn (authored by yaxunl, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D48287
Files:
include/clang/Basic/LangOptions.def
yaxunl created this revision.
yaxunl added reviewers: rjmccall, tra, b-sumner, scchan.
https://reviews.llvm.org/D49643
Files:
lib/Driver/ToolChains/HIP.cpp
test/Driver/hip-toolchain.hip
test/Driver/lit.local.cfg
Index: test/Driver/lit.local.cfg
yaxunl added a comment.
In https://reviews.llvm.org/D49643#1171158, @rjmccall wrote:
> The commit message here could be better. You're passing `-target-cpu` when
> running the device-mode compiler.
Right. Will fix. Thanks.
https://reviews.llvm.org/D49643
_
yaxunl added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:3368-3374
} else if (Form != Load && Form != LoadCopy) {
if (ValType.isConstQualified()) {
Diag(DRE->getLocStart(), diag::err_atomic_op_needs_non_const_pointer)
<< Ptr->getType() << Ptr->g
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337793: [HIP] pass -target-cpu when running the device-mode
compiler (authored by yaxunl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D49643?vs=156699&id=156953#toc
Repository:
yaxunl accepted this revision.
yaxunl added a comment.
LGTM
Repository:
rC Clang
https://reviews.llvm.org/D49723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added a comment.
This patch also adds check for array of structs. Can you include this in title
or split to a separate patch?
Comment at: lib/Sema/SemaDecl.cpp:8065
+std::find(Names.begin(), Names.end(), DesugaredTy.getAsString());
+if (Names.end() != Match)
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D49725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
yaxunl requested changes to this revision.
yaxunl added inline comments.
This revision now requires changes to proceed.
Comment at: lib/Basic/Targets/AMDGPU.h:398
+
+ LangAS getCUDABuiltinAddressSpace(unsigned AS) const override {
+return LangAS::Default;
I
yaxunl added inline comments.
Comment at: include/clang/Basic/TargetInfo.h:1157
+ /// language address space.
+ virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const {
+return getLangASFromTargetAS(AS);
I think this function is not needed.
Although
yaxunl added inline comments.
Comment at: test/CodeGenOpenCL/builtins-amdgcn.cl:3
+// RUN: %clang_cc1 -cl-std=CL2.0 -triple amdgcn-unknown-unknown -S -emit-llvm
-o - %s | FileCheck -enable-var-scope %s
+// RUN: %clang_cc1 -cl-std=CL2.0 -triple amdgcn-unknown-unknown-opencl -S
-
yaxunl added a comment.
In https://reviews.llvm.org/D47154#1108813, @tra wrote:
> CUDA does not expose explicit AS on clang size. All pointers are treated as
> generic and we infer specific address space only in LLVM.
> `__nvvm_atom_*_[sg]_*` builtins should probably be removed as they are
> i
yaxunl created this revision.
yaxunl added reviewers: tra, rjmccall.
CUDA 8.0 E.3.9.4 says: Within the body of a __device__ or __global__
function, only __shared__ variables or variables without any device
memory qualifiers may be declared with static storage class.
It is unclear how a function-s
yaxunl updated this revision to Diff 157740.
yaxunl edited the summary of this revision.
yaxunl added a comment.
update diagnostic message.
https://reviews.llvm.org/D49931
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDecl.cpp
test/CodeGenC
yaxunl added a comment.
In https://reviews.llvm.org/D49931#1178720, @tra wrote:
> > This patch also allows function-scope static const variable without device
> > memory qualifier and emits it as a global variable in constant address
> > space.
>
> What does NVCC do with local static const vari
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:11923-11930
+ if (getLangOpts().CUDA &&
+ !(VD->hasAttr() ||
+(VD->getType().isConstQualified() &&
+ !VD->hasAttr() &&
+ !VD-
yaxunl updated this revision to Diff 157778.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Revised by Artem's comments.
https://reviews.llvm.org/D49931
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDecl.cpp
test/CodeGenCU
This revision was automatically updated to reflect the committed changes.
Closed by commit rC338188: [CUDA][HIP] Allow function-scope static const
variable (authored by yaxunl, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D49931
Files:
include/clang/Basic/DiagnosticSemaKind
yaxunl accepted this revision.
yaxunl added a comment.
LGTM. Thanks.
Repository:
rC Clang
https://reviews.llvm.org/D49723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added a comment.
LGTM. Thanks.
Repository:
rC Clang
https://reviews.llvm.org/D49930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
I missed the addr space casts you added to CodeGenFunction::EmitBuiltinExpr.
With those casts it should work.
For other downstream address space agnostic languages, e.g. (HCC),
yaxunl created this revision.
yaxunl added a reviewer: rjmccall.
Explicit cast of a void pointer to a pointer type in different address space is
incorrectly classified as bitcast, which causes invalid bitcast in codegen.
The patch fixes that by checking the address space of the source and destina
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D49930#1180388, @scott.linder wrote:
> Thank you for taking a look @yaxunl. Should I wait for another reviewer or
> can I commit this?
I think it is OK to land. W
yaxunl added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:3342
auto *AT = llvm::ArrayType::get(SizeTy, NumArgs - First);
+ // Always insert the alloca in the entry block so it remains static in
+ // the SelectionDAG.
+ BasicBlock *Begin = nullptr;
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:1050
+ SrcType->getAs()->getPointeeType().getAddressSpace() !=
+
DestType->getAs()->getPointeeType().getAddressSpace();
+}
rjmccall wrote:
> I know the code was like this before,
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:1050
+ SrcType->getAs()->getPointeeType().getAddressSpace() !=
+
DestType->getAs()->getPointeeType().getAddressSpace();
+}
rjmccall wrote:
> yaxunl wrote:
> > rjmccall wrote:
> >
yaxunl added a comment.
In https://reviews.llvm.org/D50104#1184362, @scott.linder wrote:
> Address feedback; I hope I understood correctly what debug info to check for.
>
> I don't see where in CreateMemTemp and friends EmitLifetimeStart gets called,
> and I don't see any lifetime intrinsics in
yaxunl added a comment.
In https://reviews.llvm.org/D50104#1185920, @scott.linder wrote:
> I still don't quite see what you describe; with that change all of the
> lifetime.end calls pile up just before the enclosing function returns, not
> after each call to enqueue_kernel. Looking at
> https
yaxunl accepted this revision.
yaxunl added a comment.
LGTM. Thanks!
https://reviews.llvm.org/D50104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL338805: Sema: Fix explicit address space cast involving void
pointers (authored by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D500
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
https://reviews.llvm.org/D43078
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
yaxunl created this revision.
yaxunl added reviewers: t-tye, b-sumner, arsenm.
Herald added subscribers: tpr, dstuttard, nhaehnle, wdng, kzhuravl.
https://reviews.llvm.org/D43171
Files:
include/clang/Basic/BuiltinsAMDGPU.def
lib/Basic/Targets/AMDGPU.cpp
test/CodeGen/target-data.c
test/Cod
yaxunl created this revision.
yaxunl added reviewers: Anastasia, bader.
The following test case causes issue with codegen of __enqueue_block
void (^block)(void) = ^{ callee(id, out); };
enqueue_kernel(queue, 0, ndrange, block);
Clang first does codegen for block expression in the first l
yaxunl added inline comments.
Comment at: test/CodeGenOpenCL/address-spaces.cl:37
+// SPIR: i32 addrspace(2)* %arg
+// GIZ: i32 addrspace(4)* %arg
void f__c(__constant int *arg) {}
t-tye wrote:
> Suggest using the same name across all the OpenCL tests as some ar
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325031: [AMDGPU] Change constant addr space to 4 (authored
by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D43171?vs=133802&id=13407
This revision was automatically updated to reflect the committed changes.
Closed by commit rC325031: [AMDGPU] Change constant addr space to 4 (authored
by yaxunl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43171?vs=133802&id=134071#toc
Repository:
rC Clang
https://re
yaxunl updated this revision to Diff 134107.
yaxunl added a comment.
Update with Greg's change.
https://reviews.llvm.org/D42800
Files:
include/clang/Basic/Cuda.h
include/clang/Driver/ToolChain.h
lib/Basic/Cuda.cpp
lib/Basic/Targets/AMDGPU.cpp
lib/Basic/Targets/AMDGPU.h
lib/Basic/Tar
yaxunl updated this revision to Diff 134416.
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by John's comments. Removed address space from CallArg and added
l-value expression instead.
https://reviews.llvm.org/D34367
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CG
yaxunl added inline comments.
Comment at: lib/CodeGen/CGCall.h:211
+ push_back(CallArg(rvalue, type, needscopy, AS));
}
rjmccall wrote:
> Ah, I think I understand what's going on here now. "indirect byval"
> arguments include an implicit copy to the
yaxunl added a comment.
In https://reviews.llvm.org/D43240#1008560, @Anastasia wrote:
> LGTM! Thanks for looking at this. Just one thing, I was wondering whether it
> would be cleaner way if we extend
> test/CodeGenOpenCL/cl20-device-side-enqueue.cl instead of adding a new one
> here? Because
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325264: [OpenCL] Fix __enqueue_block for block with captures
(authored by yaxunl, committed by ).
Herald added subscribers: llvm-commits, nhaehnle.
Changed prior to commit:
https://reviews.llvm.org/D432
yaxunl created this revision.
yaxunl added reviewers: t-tye, b-sumner.
Remove amdgiz and use AMDGCN as check prefix.
https://reviews.llvm.org/D43340
Files:
test/CodeGen/address-space.c
test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
test/CodeGenCXX/vla.cpp
test/CodeGenOpenCL/ad
yaxunl added a comment.
In https://reviews.llvm.org/D43340#1008980, @t-tye wrote:
> LGTM Plus I think there was a test with giz in its name. Should that be
> renamed?
That's test/CodeGenOpenCL/amdgpu-env-amdgiz.cl. I already renamed it in my last
commit.
https://reviews.llvm.org/D43340
_
yaxunl added a comment.
In https://reviews.llvm.org/D34367#1009021, @rjmccall wrote:
> That's not really okay; there are some places that make guarantees about
> call-argument ordering, and in general we want that to be decided at a higher
> level, rather than having a particular order forced i
This revision was automatically updated to reflect the committed changes.
Closed by commit rC325279: Clean up AMDGCN tests (authored by yaxunl, committed
by ).
Changed prior to commit:
https://reviews.llvm.org/D43340?vs=134445&id=134465#toc
Repository:
rC Clang
https://reviews.llvm.org/D433
yaxunl updated this revision to Diff 135109.
yaxunl added a comment.
Extends NeedsCopy of CallArg for indirect byval arguments.
https://reviews.llvm.org/D34367
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGObjCGNU.cpp
yaxunl added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:3505
+if (AS != LangAS::Default && AS != LangAS::opencl_private &&
+AS != CGM.getASTAllocaAddressSpace())
+ Flag = CallArg::ByValArgNeedsCopy;
rjmccall wrote:
> This is an odd condi
yaxunl updated this revision to Diff 135301.
yaxunl added a comment.
Replace Flag with LValue in CallArg.
https://reviews.llvm.org/D34367
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/ItaniumCX
yaxunl accepted this revision.
yaxunl added a comment.
LGTM. Thanks.
Repository:
rC Clang
https://reviews.llvm.org/D43570
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 135474.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D34367
Files:
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExprCXX.cpp
lib
yaxunl updated this revision to Diff 135499.
yaxunl added a comment.
sync to ToT.
https://reviews.llvm.org/D34367
Files:
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGGPUB
yaxunl created this revision.
yaxunl added reviewers: b-sumner, Anastasia, bader.
Herald added a subscriber: nhaehnle.
OpenCL runtime tracks the invoke function emitted for
any block expression. Due to restrictions on blocks in
OpenCL (v2.0 s6.12.5), it is always possible to know the
block invoke
yaxunl added inline comments.
Comment at: lib/AST/ASTContext.cpp:1942
case Type::Pipe: {
-TypeInfo Info = getTypeInfo(cast(T)->getElementType());
-Width = Info.Width;
-Align = Info.Align;
+Width = Target->getPointerWidth(0);
+Align = Target->getPointerAlign
yaxunl created this revision.
Herald added subscribers: t-tye, Anastasia, tpr, dstuttard, wdng, kzhuravl.
AMDGPU backend requires global variables in global or constant address space
and alloca in private address space. However, in C++ all variables are in
default address space. Previously chang
yaxunl updated this revision to Diff 100819.
yaxunl added a comment.
Fix comments.
https://reviews.llvm.org/D33706
Files:
lib/Basic/Targets.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/Code
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:1107
assert(T.getAddressSpace() == LangAS::Default);
if (getASTAllocaAddressSpace() != LangAS::Default) {
auto *Addr = getTargetHooks().performAddrSpaceCast(
-
yaxunl updated this revision to Diff 100899.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Remove redundant code.
https://reviews.llvm.org/D33706
Files:
lib/Basic/Targets.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFun
yaxunl added a comment.
In https://reviews.llvm.org/D33597#770137, @Anastasia wrote:
> Use global AS pointer for pipe size.
>
> @Sam, I am moving you to the reviewer to finish this change. Do you think it
> makes sense to add RUN line with some AMD GPU in triple to the test?
I would appreciate
yaxunl updated this revision to Diff 101070.
yaxunl marked 2 inline comments as done.
yaxunl retitled this revision from "[AMDGPU] Fix address space for global and
temporary variables in C++" to "CodeGen: Cast temporary variable to proper
address space".
yaxunl edited the summary of this revision
yaxunl added a comment.
LGTM. Thanks.
https://reviews.llvm.org/D33821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 101221.
yaxunl marked 7 inline comments as done.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D33706
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
test/Code
yaxunl updated this revision to Diff 101227.
yaxunl added a comment.
Fix a comment.
https://reviews.llvm.org/D33706
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGen/address-space.c
test/CodeGen/default-address-spa
yaxunl created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, wdng, kzhuravl.
amdgcn target requires global variable to stay in global or constant address
space.
In C or C++ global variables are emitted in the default (generic) address space
which the amdgcn backend cannot handle
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
https://reviews.llvm.org/D33597
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks! sorry for the delay.
https://reviews.llvm.org/D33598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
yaxunl updated this revision to Diff 101955.
yaxunl retitled this revision from "Support synchronisation scope in Clang
atomic builtin functions" to "Add OpenCL 2.0 atomic builtin functions as Clang
builtin".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Add __opencl_atomic
yaxunl updated this revision to Diff 102204.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Add TargetInfo::getTargetConstantAddressSpace.
https://reviews.llvm.org/D33842
Files:
include/clang/Basic/TargetInfo.h
lib/Basic/Targets.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/C
yaxunl updated this revision to Diff 102374.
yaxunl marked 11 inline comments as done.
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D28691
Files:
docs/LanguageExtensions.rst
include/clang/AST/Expr.h
include/clang/
yaxunl added a comment.
Can you add missing types to test/CodeGenOpenCL/opencl_types.cl ?
Comment at: include/clang/Basic/TargetInfo.h:1034
+ virtual LangAS::ID getOpenCLTypeAddrSpace(BuiltinType::Kind K) const {
+switch (K) {
+#define IMAGE_TYPE(ImgType, Id, SingletonId,
yaxunl added a comment.
LGTM. Thanks.
https://reviews.llvm.org/D34235
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added inline comments.
Comment at: include/clang/Basic/TargetInfo.h:1041
+default:
+ return LangAS::Default;
+}
bader wrote:
> yaxunl wrote:
> > I think the default (including even_t, clk_event_t, queue_t, reserved_id_t)
> > should be global
101 - 200 of 3009 matches
Mail list logo