[PATCH] D50321: AMDGPU: Add builtin for s_dcache_wb

2018-08-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339110 https://reviews.llvm.org/D50321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50320: AMDGPU: Add builtin for s_dcache_inv_vol

2018-08-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339109 https://reviews.llvm.org/D50320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50376: AMDGPU: Fix enabling denormals by default on pre-VI targets

2018-08-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: b-sumner, kzhuravl. Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng. Fast FMAF is not a sufficient condition to enable denormals. Before VI, enabling denormals caused https://reviews.llvm.org/F32 instructions to run at

[PATCH] D50376: AMDGPU: Fix enabling denormals by default on pre-VI targets

2018-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339278 https://reviews.llvm.org/D50376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50493: AMDGPU: Add another missing builtin

2018-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: kzhuravl, b-sumner. Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng. https://reviews.llvm.org/D50493 Files: include/clang/Basic/BuiltinsAMDGPU.def test/CodeGenOpenCL/builtins-amdgcn-ci.cl test/SemaOpenCL/builtins-

[PATCH] D50493: AMDGPU: Add another missing builtin

2018-08-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339395 https://reviews.llvm.org/D50493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50843: AMDGPU: Correct errors in device table

2018-08-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, kzhuravl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng. Avoids regressions in future commit when the device name is round tripped through the table https://reviews.llvm.org/D50843 Files: lib/Basic/Targets/AMDGPU

[PATCH] D50843: AMDGPU: Correct errors in device table

2018-08-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r339934 https://reviews.llvm.org/D50843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: tra, jlebar. Herald added subscribers: Anastasia, wdng. The same semantics work for OpenCL, and probably any offload language. Keep the old name around as an alias. https://reviews.llvm.org/D50957 Files: include/clang/Driver/CC1Options.td

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 161439. arsenm added a comment. Forgot to commit part https://reviews.llvm.org/D50957 Files: include/clang/Driver/CC1Options.td lib/Driver/ToolChains/Cuda.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGenCUDA/link-device-bitcode.cu test/CodeGenC

[PATCH] D50957: Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r340193 https://reviews.llvm.org/D50957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50984: AMDGPU: Move target code into TargetParser

2018-08-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: rampitec, kzhuravl, yaxunl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely. arsenm added a dependency: D50983: AMDGPU: Partially move target handling code from clang to TargetParser. https://reviews.llvm.org/D50984 F

[PATCH] D50984: AMDGPU: Move target code into TargetParser

2018-08-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r340292 https://reviews.llvm.org/D50984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46871: [AMDGPU] Add interpolation builtins

2018-05-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: test/CodeGenOpenCL/builtins-amdgcn-interp.cl:2-28 +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx900 -S -o - %s | FileCheck %s --check-prefixes=CHECK,GFX9,BANK32 +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -targ

[PATCH] D46871: [AMDGPU] Add interpolation builtins

2018-05-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/BuiltinsAMDGPU.def:103-107 +BUILTIN(__builtin_amdgcn_interp_p1_f16, "ffUiUibUi", "nc") +BUILTIN(__builtin_amdgcn_interp_p2_f16, "hffUiUibUi", "nc") +BUILTIN(__builtin_amdgcn_interp_p1, "ffUiUiUi", "nc") +BUILTIN(__buil

[PATCH] D46871: [AMDGPU] Add interpolation builtins

2018-05-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/BuiltinsAMDGPU.def:103-107 +BUILTIN(__builtin_amdgcn_interp_p1_f16, "ffUiUibUi", "nc") +BUILTIN(__builtin_amdgcn_interp_p2_f16, "hffUiUibUi", "nc") +BUILTIN(__builtin_amdgcn_interp_p1, "ffUiUiUi", "nc") +BUILTIN(__buil

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I'm looking at how the address space mapping works for builtins, and I think what's there is just uselessly broken and needs to be fixed. It seems to be operating under the assumption that the address spaces the target defines are totally disjoint from the language addre

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I think the intent of the current code is for the address space to correspond to a "target address space" as if the user code used __attribute__((address_space(n))) to specify a pointer value. This is confusingly named, and different from the target address space selecte

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-05-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: Anastasia, yaxunl, rjmccall. Herald added subscribers: tpr, nhaehnle, wdng. The way address space declarations for builtins currently work is nearly useless. The code assumes the address spaces used for builtins is a confusingly named "target a

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-10-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 117855. arsenm added a comment. Check noduplicate https://reviews.llvm.org/D38113 Files: include/clang/Basic/LangOptions.h lib/CodeGen/CGCall.cpp test/CodeGenOpenCL/amdgpu-attrs.cl test/CodeGenOpenCL/convergent.cl Index: test/CodeGenOpenCL/convergen

[PATCH] D38113: OpenCL: Assume functions are convergent

2017-10-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r315094 Comment at: test/CodeGenOpenCL/convergent.cl:130 +// CHECK: attributes #0 = { noinline norecurse nounwind " +// CHECK: attributes #1 = { {{[^}]*}}convergent{{[^}]*}} } +// CHECK: attributes #2 = { {{[^}]*}}convergent{

[PATCH] D38698: AMDGPU: Add read_exec_lo/hi builtins

2017-10-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, kzhuravl. https://reviews.llvm.org/D38698 Files: include/clang/Basic/BuiltinsAMDGPU.def lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/builtins-amdgcn.cl Index: test/CodeGenOpenCL/builtins-amdgcn.

[PATCH] D38698: AMDGPU: Add read_exec_lo/hi builtins

2017-10-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r315238 https://reviews.llvm.org/D38698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38770: AMDGPU: Use stricter bounds for workitem builtins

2017-10-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng. https://reviews.llvm.org/D38770 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets/AMDGPU.cpp lib/Basic/Targets/AMDGPU.h lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/builtins-amdgcn.cl

[PATCH] D38667: AMDGPU: Parse r600 CPU name early and expose FMAF capability

2017-10-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D38667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D38770: AMDGPU: Use stricter bounds for workitem builtins

2017-10-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 119209. arsenm added a comment. Use 1024 for OpenCL https://reviews.llvm.org/D38770 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets/AMDGPU.cpp lib/Basic/Targets/AMDGPU.h lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/builtins-amdgcn.cl te

[PATCH] D51209: AMDGPU: Default to hidden visibility

2018-08-24 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: t-tye, kzhuravl, yaxunl. Herald added subscribers: sunfish, aheejin, tpr, dstuttard, nhaehnle, wdng, jvesely, dschuff. Object linking isn't supported, so it's not useful to emit default visibility. Default visibility requires relocations we do

[PATCH] D51434: [HIP] Add -amdgpu-internalize-symbols option to opt

2018-08-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I have a patch to change the default visibility which I think is a better option https://reviews.llvm.org/D51434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D51434: [HIP] Add -amdgpu-internalize-symbols option to opt

2018-08-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. 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 https://reviews.llvm.org/D51434 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D51434: [HIP] Add -amdgpu-internalize-symbols option to opt

2018-08-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In https://reviews.llvm.org/D51434#1218017, @yaxunl wrote: > 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 toolcha

[PATCH] D51434: [HIP] Add -fvisibility hidden option to clang

2018-08-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/Driver/ToolChains/HIP.cpp:256 +CC1Args.append({"-fvisibility", "hidden"}); } We should probably start subclassing the HIP toolchain from AMDGPU and share more of this https://reviews.llvm.org/D51434 _

[PATCH] D51209: AMDGPU: Default to hidden visibility

2018-08-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r341033 https://reviews.llvm.org/D51209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51434: [HIP] Add -fvisibility hidden option to clang

2018-08-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/HIP.cpp:256 +CC1Args.append({"-fvisibility", "hidden"}); } yaxunl wrote: > arsenm wrote: > > We should probably

[PATCH] D51434: [HIP] Add -fvisibility hidden option to clang

2018-08-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/Driver/ToolChains/HIP.cpp:256 +CC1Args.append({"-fvisibility", "hidden"}); } arsenm wrote: > yaxunl wrote: > > arsenm wrote: > > > We should probably start subclassing the HIP toolchain from AMDGPU and > > > s

[PATCH] D51857: HIP: Remove reference to irif

2018-09-10 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: yaxunl. Herald added a subscriber: wdng. This is no longer separately installed. https://reviews.llvm.org/D51857 Files: lib/Driver/ToolChains/HIP.cpp test/Driver/hip-device-libs.hip Index: test/Driver/hip-device-libs.hip =

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping https://reviews.llvm.org/D47154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49650: Targets/AMDGPU: Don't set fp32-denormals feature for r600

2018-07-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. According to cayman manual, these registers do exist so we should probably just make the feature accepted on r600 as well Repository: rC Clang https://reviews.llvm.org/D49650 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D49650: Targets/AMDGPU: Don't set fp32-denormals feature for r600

2018-07-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In https://reviews.llvm.org/D49650#1175461, @jvesely wrote: > In https://reviews.llvm.org/D49650#1175438, @arsenm wrote: > > > According to cayman manual, these registers do exist so we should probably > > just make the feature accepted on r600 as well > > > sure, that's

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1157 + /// language address space. + virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const { +return getLangASFromTargetAS(AS); yaxunl wrote: > I think this function is not ne

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-07-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 157885. arsenm added a comment. Remove old run line https://reviews.llvm.org/D47154 Files: include/clang/AST/ASTContext.h include/clang/Basic/BuiltinsAMDGPU.def include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basic/Targets/AMDGPU.h li

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Should this also test for lifetime markers? Repository: rC Clang https://reviews.llvm.org/D50104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-08-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r338707 https://reviews.llvm.org/D47154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50320: AMDGPU: Add builtin for s_dcache_inv_vol

2018-08-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: kzhuravl, yaxunl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng. https://reviews.llvm.org/D50320 Files: include/clang/Basic/BuiltinsAMDGPU.def test/CodeGenOpenCL/builtins-amdgcn-ci.cl test/SemaOpenCL/builtins-amdgcn-err

[PATCH] D50321: AMDGPU: Add builtin for s_dcache_wb

2018-08-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, kzhuravl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng. https://reviews.llvm.org/D50321 Files: include/clang/Basic/BuiltinsAMDGPU.def test/CodeGenOpenCL/builtins-amdgcn-vi.cl test/SemaOpenCL/builtins-amdgcn-err

[PATCH] D43078: Fix crash on array initializer with non-0 alloca addrspace

2018-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: yaxunl. Herald added a subscriber: wdng. https://reviews.llvm.org/D43078 Files: lib/CodeGen/CGDecl.cpp test/CodeGenOpenCL/address-space-constant-initializers.cl test/CodeGenOpenCL/private-array-initialization.cl Index: test/CodeGenOpe

[PATCH] D43078: Fix crash on array initializer with non-0 alloca addrspace

2018-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r324641 https://reviews.llvm.org/D43078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-02-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Can’t you just change the description to be the LangAS value? I also thought these happened to be the same already https://reviews.llvm.org/D43281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-02-27 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I meant we could just change the value to whatever it happens to be for AMDGPU. That this is the language address space is surprising to me though, so maybe that should change https://reviews.llvm.org/D43281 ___ cfe-commits

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-03-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In https://reviews.llvm.org/D43281#1023962, @dfukalov wrote: > The problem is that if set addrspace "2" in description string, > CanT.getAddressSpace() returns target addrspace value "11" (shifted in the > enum) and compares it with input LangAS addrspace ("2", "opencl_l

[PATCH] D44533: [AMDGPU] Fix codegen for inline assembly

2018-03-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/Basic/Targets/AMDGPU.h:288 + // Constraint parm will be left pointing at the last character of + // the constraint. In practice, it won't be changed unless the parm? https://reviews.llvm.org/D44533 _

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-06-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/BuiltinsAMDGPU.def:49 + +// FIXME: Need to disallow constant address space. BUILTIN(__builtin_amdgcn_div_scale, "dddbb*", "n") Anastasia wrote: > Do you plan to provide the support for it later? Or if

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-06-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 150179. arsenm added a comment. Rebase and add comment https://reviews.llvm.org/D47154 Files: include/clang/AST/ASTContext.h include/clang/Basic/BuiltinsAMDGPU.def include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basic/Targets/AMDGPU.h

[PATCH] D52891: [AMDGPU] Add -fvisibility-amdgpu-non-kernel-functions

2018-10-11 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Offload to me sounds like it decided to extract out a section of the program for offload, which is not how OpenCL works https://reviews.llvm.org/D52891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/AST/Decl.cpp:565 +return FD->hasAttr(); + return dyn_cast(D); +} isa Repository: rC Clang https://reviews.llvm.org/D53153 ___ cfe-commits mailing list cfe-commi

[PATCH] D52320: AMDGPU: add __builtin_amdgcn_update_dpp

2018-10-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D52320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D57349: AMDGPU: Add ds append/consume builtins

2019-01-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, rampitec, b-sumner. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl. https://reviews.llvm.org/D57349 Files: include/clang/Basic/BuiltinsAMDGPU.def lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/b

[PATCH] D57349: AMDGPU: Add ds append/consume builtins

2019-01-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r352443 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57349/new/ https://reviews.llvm.org/D57349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D57390: OpenCL: Don't promote vector args to printf

2019-01-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: rjmccall, Anastasia. Herald added subscribers: yaxunl, wdng. This reverts commit r348083. This was based on misreading the spec for printf specifiers. Start respecting the length modifier for vectors. The warnings are still incomplete.

[PATCH] D57405: Revert "OpenCL: Extend argument promotion rules to vector types"

2019-01-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: rjmccall, Anastasia. Herald added subscribers: yaxunl, wdng. This reverts r348083. This was based on a misreading of the spec for printf specifiers. Also revert r343653, as without a subsequent patch, a correctly specified format for a

[PATCH] D57390: OpenCL: Use length modifier for warning on vector printf arguments

2019-01-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 184147. arsenm marked 2 inline comments as done. arsenm retitled this revision from "OpenCL: Don't promote vector args to printf" to "OpenCL: Use length modifier for warning on vector printf arguments". arsenm edited the summary of this revision. arsenm added a

[PATCH] D57390: OpenCL: Use length modifier for warning on vector printf arguments

2019-01-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r352540 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57390/new/ https://reviews.llvm.org/D57390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D57405: Revert "OpenCL: Extend argument promotion rules to vector types"

2019-01-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r352539 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57405/new/ https://reviews.llvm.org/D57405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In https://reviews.llvm.org/D53153#1288059, @rjmccall wrote: > I agree with Richard that I'm not sure what the point of supporting frontend > visibility settings in OpenCL is. If you want the "everything is internal to > the image" optimization, presumably you can just

[PATCH] D54162: OpenCL: Don't warn on v printf modifier

2018-11-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: Anastasia. Herald added subscribers: yaxunl, wdng. This avoids spurious warnings, but could use a lot of work. For example the number of vector elements is not verified, and the passed value type is not checked. https://reviews.llvm.org/D541

[PATCH] D54162: OpenCL: Don't warn on v printf modifier

2018-11-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r346806 https://reviews.llvm.org/D54162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D55021: Mark __builtin_shufflevector as using custom type checking

2018-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: Anastasia. Herald added a subscriber: wdng. The custom handling seems to all be implemented already. This avoids regressions in a future patch when float vectors are ordinarily promoted to double vectors in variadic calls. https://reviews.ll

[PATCH] D55022: OpenCL: Extend argument promotion rules to vector types

2018-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: Anastasia. Herald added subscribers: yaxunl, wdng. The spec is ambiguous on whether vector types are allowed to be implicitly converted. The only legal context I think this can be used for OpenCL is printf, where it seems necessary. https://

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: Anastasia. Herald added subscribers: yaxunl, wdng. The vector modifier is considered separate, so don't treat it as a conversion specifier. This is still not warning on some cases, like using a type that isn't a valid vector element.

[PATCH] D55021: Mark __builtin_shufflevector as using custom type checking

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r347873 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55021/new/ https://reviews.llvm.org/D55021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D55022: OpenCL: Extend argument promotion rules to vector types

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 175873. arsenm added a comment. Add codegen test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55022/new/ https://reviews.llvm.org/D55022 Files: lib/Sema/SemaExpr.cpp test/CodeGenOpenCL/printf.cl Index: test/CodeGenOpenCL/printf.cl ===

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked 2 inline comments as done. arsenm added inline comments. Comment at: test/SemaOpenCL/format-strings-fixit.cl:13 +void vector_fixits() { +// printf("%f", (int) 123); + printf("%v4f", (int4) 123); Anastasia wrote: > Does this not work yet? It does.

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done and an inline comment as not done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:205 +auto *Aux = CGM.getContext().getAuxTargetInfo(); +if (Aux && Aux->getTriple().getArch() == llvm::Triple::amdgcn) { + auto *ArgTy = Arg->getType()->getPointerElementType(); Checki

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 175920. arsenm added a comment. Add tests without fp64 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55023/new/ https://reviews.llvm.org/D55023 Files: include/clang/AST/FormatString.h lib/AST/FormatString.cpp lib/AST/FormatStringParsing.h li

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1313264 , @yaxunl wrote: > In D55067#1313213 , @rjmccall wrote: > > > This seems backwards. Clang knows what the actual ABI alignment of the C > > type is, and it doesn't have to

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:205 +auto *Aux = CGM.getContext().getAuxTargetInfo(); +if (Aux && Aux->getTriple().getArch() == llvm::Triple::amdgcn) { + auto *ArgTy = Arg->getType()->getPointerElementType(); yaxunl

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I don't understand why there's a discrepancy in this case. Why does anything think the alignment of a packed struct is anything other than 1? Why is the C alignment claiming something higher? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55067/new/ https://revi

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float

[PATCH] D55022: OpenCL: Extend argument promotion rules to vector types

2018-12-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm marked an inline comment as done. arsenm added a comment. r348083 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55022/new/ https://reviews.llvm.org/D55022 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-12-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r348084 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55023/new/ https://reviews.llvm.org/D55023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1313419 , @rjmccall wrote: > I understand that it's copied into a properly-aligned local variable, but if > it affects how the function is called, that's also part of the ABI, and it > should be taken from the C alignmen

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1318959 , @rjmccall wrote: > In D55067#1318810 , @arsenm wrote: > > > In D55067#1313419 , @rjmccall > > wrote: > > > > > I understand that

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I think if we can just declare something simple to follow that doesn't depend on the IR type alignment, we could pack any basic type and align any aggregates to 4 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55067/new/ https://reviews.llvm.org/D55067 __

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I don't really see the point of this and think it will just be an inconvenience to llvm developers. Another use case we have for using these in a build system is for the builtin library shipped with the compiler CHANGES SINCE LAST ACTION https://reviews.llvm.org/D551

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. The real solution is to stop invoking these tools separately. clang -cc1 should be used for everything Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59316/new/ https://reviews.llvm.org/D59316 ___

[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, ashi1. Herald added subscribers: jdoerfert, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl. This is pending finalization of what the device library build path/names are. I'm also not sure if some of the standard default libr

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59316#1427996 , @ashi1 wrote: > Hi Matt, that solution will need refactoring and testing. Currently, > HIP-Clang is following the same link flow as HCC HCC is also an issue. I really want effort put into fixing this rather th

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59316#1429580 , @yaxunl wrote: > Here we are looking at the code which emulates a "linker" for HIP toolchain. > The offloading action builder requests the offloading toolchain have a > linker, but amdgpu does not have a real l

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59316#1431253 , @yaxunl wrote: > In D59316#1431238 , @arsenm wrote: > > > In D59316#1429580 , @yaxunl wrote: > > > > > Here we are looking at the

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59316#1431284 , @yaxunl wrote: > In D59316#1431276 , @arsenm wrote: > > > In D59316#1431253 , @yaxunl wrote: > > > > > In D59316#1431238

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Should it be downgraded to a warning about an extension instead of just removing it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 ___ cfe-commits mailing list cfe-commits@

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D59492#1434636 , @Anastasia wrote: > In D59492#1433796 , @arsenm wrote: > > > Should it be downgraded to a warning about an extension instead of just > > removing it? > > > What would you

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:397 +def ext_pp_opencl_variadic_macros : Extension< + "variadic macros not supported in OpenCL">; Maybe rephrase the message now to say it's an extension? The other similar wa

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-25 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. Herald added a subscriber: wdng. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59492/new/ https://reviews.llvm.org/D59492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D59863: [HIP] Support gpu arch gfx906+sram-ecc

2019-03-27 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. Herald added a subscriber: wdng. This should not be a new device name. This is also not how the features should be passed to the backend. These should be added to the function IR dire

[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

2019-04-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: lib/Driver/ToolChains/AMDGPU.h:25 +/// TODO: Generalize to handle libclc. +class RocmInstallationDetector { +private: yaxunl wrote: > I don't think we should detect ROCm installati

[PATCH] D52412: OpenCL: Mark printf format string argument

2018-09-24 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added a reviewer: Anastasia. Herald added subscribers: yaxunl, wdng. Fixes not warning on format string errors. https://reviews.llvm.org/D52412 Files: lib/Headers/opencl-c.h test/SemaOpenCL/printf-format-string-warnings.cl Index: test/SemaOpenCL/printf

[PATCH] D52320: AMDGPU: add __builtin_amdgcn_update_dpp

2018-09-24 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:11313-11315 + case AMDGPU::BI__builtin_amdgcn_update_dpp: { +llvm::SmallVector Args; +for (unsigned I = 0; I != 6; ++I) The only difference between this and mov_dpp is the argument count

  1   2   3   4   5   6   7   8   9   10   >