r340056 - [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries

2018-08-17 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Aug 17 10:47:31 2018 New Revision: 340056 URL: http://llvm.org/viewvc/llvm-project?rev=340056&view=rev Log: [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries Different shared libraries contain different fat binary, which is sto

r331811 - [HIP] Add hip offload kind

2018-05-08 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 8 14:02:12 2018 New Revision: 331811 URL: http://llvm.org/viewvc/llvm-project?rev=331811&view=rev Log: [HIP] Add hip offload kind There are quite differences in HIP action builder and action job creation, which justifies to define a separate offload kind. Differenti

r331895 - [OpenCL] Fix typos in emitted enqueue kernel function names

2018-05-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed May 9 10:07:06 2018 New Revision: 331895 URL: http://llvm.org/viewvc/llvm-project?rev=331895&view=rev Log: [OpenCL] Fix typos in emitted enqueue kernel function names Two typos: vaarg => vararg get_kernel_preferred_work_group_multiple => get_kernel_preferred_work_group

r332121 - [HIP] Let clang-offload-bundler support HIP

2018-05-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri May 11 12:02:18 2018 New Revision: 332121 URL: http://llvm.org/viewvc/llvm-project?rev=332121&view=rev Log: [HIP] Let clang-offload-bundler support HIP When bundle/unbundle intermediate files for HIP, there may be multiple sub archs, therefore BoundArch needs to be includ

r332122 - [HIP] Diagnose unsupported host triple

2018-05-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri May 11 12:14:34 2018 New Revision: 332122 URL: http://llvm.org/viewvc/llvm-project?rev=332122&view=rev Log: [HIP] Diagnose unsupported host triple Differential Revision: https://reviews.llvm.org/D46487 Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td

r332123 - [HIP] Set proper triple and offload kind for the toolchain

2018-05-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri May 11 12:21:39 2018 New Revision: 332123 URL: http://llvm.org/viewvc/llvm-project?rev=332123&view=rev Log: [HIP] Set proper triple and offload kind for the toolchain Also introduce --hip-link option to indicate HIP for linking. Differential Revision: https://reviews.llv

r332279 - CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon May 14 12:20:12 2018 New Revision: 332279 URL: http://llvm.org/viewvc/llvm-project?rev=332279&view=rev Log: CodeGen: Emit string literal in constant address space Some targets have constant address space (e.g. amdgcn). For them string literal should be emitted in constan

r332593 - CodeGen: Fix invalid bitcast for lifetime.start/end

2018-05-17 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu May 17 04:16:35 2018 New Revision: 332593 URL: http://llvm.org/viewvc/llvm-project?rev=332593&view=rev Log: CodeGen: Fix invalid bitcast for lifetime.start/end lifetime.start/end expects pointer argument in alloca address space. However in C++ a temporary variable is in d

r332724 - [HIP] Support offloading by linker script

2018-05-18 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri May 18 08:07:56 2018 New Revision: 332724 URL: http://llvm.org/viewvc/llvm-project?rev=332724&view=rev Log: [HIP] Support offloading by linker script To support linking device code in different source files, it is necessary to embed fat binary at host linking stage. This

r332982 - Call CreateTempMemWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 22 07:36:26 2018 New Revision: 332982 URL: http://llvm.org/viewvc/llvm-project?rev=332982&view=rev Log: Call CreateTempMemWithoutCast for ActiveFlag Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca without casting to default add

r332991 - Revert r332982 Call CreateTempMemWithoutCast for ActiveFlag

2018-05-22 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 22 09:13:07 2018 New Revision: 332991 URL: http://llvm.org/viewvc/llvm-project?rev=332991&view=rev Log: Revert r332982 Call CreateTempMemWithoutCast for ActiveFlag Due to regression on arm. Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/lib/CodeGen/CGCl

r333483 - Add action builder for HIP

2018-05-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 29 17:49:10 2018 New Revision: 333483 URL: http://llvm.org/viewvc/llvm-project?rev=333483&view=rev Log: Add action builder for HIP To support separate compile/link and linking across device IR in different source files, a new HIP action builder is introduced. Basical

r333484 - Add HIP toolchain

2018-05-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 29 17:53:50 2018 New Revision: 333484 URL: http://llvm.org/viewvc/llvm-project?rev=333484&view=rev Log: Add HIP toolchain This patch adds HIP toolchain to support HIP language mode. It includes: Create specific compiler jobs for HIP. Choose specific libraries for HI

r314452 - [AMDGPU] Allow flexible register names in inline asm constraints

2017-09-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Sep 28 12:07:59 2017 New Revision: 314452 URL: http://llvm.org/viewvc/llvm-project?rev=314452&view=rev Log: [AMDGPU] Allow flexible register names in inline asm constraints Currently AMDGPU inline asm only allow v and s as register names in constraints. This patch allows

r314802 - [OpenCL] Fix checking of vector type casting

2017-10-03 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 3 07:34:29 2017 New Revision: 314802 URL: http://llvm.org/viewvc/llvm-project?rev=314802&view=rev Log: [OpenCL] Fix checking of vector type casting Currently clang allows the following code int a; int b = (const int) a; However it does not the following code int4 a

r314932 - [OpenCL] Clean up and add missing fields for block struct

2017-10-04 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Oct 4 13:32:17 2017 New Revision: 314932 URL: http://llvm.org/viewvc/llvm-project?rev=314932&view=rev Log: [OpenCL] Clean up and add missing fields for block struct Currently block is translated to a structure equivalent to struct Block { void *isa; int flags; int

r315668 - [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Oct 12 20:37:48 2017 New Revision: 315668 URL: http://llvm.org/viewvc/llvm-project?rev=315668&view=rev Log: [OpenCL] Add LangAS::opencl_private to represent private address space in AST Currently Clang uses default address space (0) to represent private address space for

r315678 - Fix regression of test/CodeGenOpenCL/address-spaces.cl on ppc

2017-10-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Oct 13 06:53:06 2017 New Revision: 315678 URL: http://llvm.org/viewvc/llvm-project?rev=315678&view=rev Log: Fix regression of test/CodeGenOpenCL/address-spaces.cl on ppc Modified: cfe/trunk/test/CodeGenOpenCL/address-spaces.cl Modified: cfe/trunk/test/CodeGenOpenCL/a

r315804 - [OpenCL] Emit enqueued block as kernel

2017-10-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Sat Oct 14 05:23:50 2017 New Revision: 315804 URL: http://llvm.org/viewvc/llvm-project?rev=315804&view=rev Log: [OpenCL] Emit enqueued block as kernel In OpenCL the kernel function and non-kernel function has different calling conventions. For certain targets they have diffe

r315805 - Fix build failure on android due to missing std::to_string()

2017-10-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Sat Oct 14 05:51:52 2017 New Revision: 315805 URL: http://llvm.org/viewvc/llvm-project?rev=315805&view=rev Log: Fix build failure on android due to missing std::to_string() Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp URL:

r316000 - CodeGen: Fix invalid bitcasts for atomic builtins

2017-10-17 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 17 07:19:29 2017 New Revision: 316000 URL: http://llvm.org/viewvc/llvm-project?rev=316000&view=rev Log: CodeGen: Fix invalid bitcasts for atomic builtins Currently clang assumes the temporary variables emitted during codegen of atomic builtins have address space 0, wh

r316165 - [AMDGPU] Fix bug in enqueued block codegen due to an extra line

2017-10-19 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Oct 19 08:56:13 2017 New Revision: 316165 URL: http://llvm.org/viewvc/llvm-project?rev=316165&view=rev Log: [AMDGPU] Fix bug in enqueued block codegen due to an extra line Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp cfe/trunk/test/CodeGenOpenCL/amdgpu-enqueue-k

r316353 - CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable

2017-10-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Oct 23 10:49:26 2017 New Revision: 316353 URL: http://llvm.org/viewvc/llvm-project?rev=316353&view=rev Log: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable Differential Revision: https://reviews.llvm.org/D39184 Modified: cfe/trunk

r316484 - CodeGen: Fix missing debug loc due to alloca

2017-10-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 24 12:14:43 2017 New Revision: 316484 URL: http://llvm.org/viewvc/llvm-project?rev=316484&view=rev Log: CodeGen: Fix missing debug loc due to alloca Builder save/restores insertion pointer when emitting addr space cast for alloca, but does not save/restore debug loc,

r340873 - [HIP] Fix output file extension

2018-08-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Aug 28 14:09:09 2018 New Revision: 340873 URL: http://llvm.org/viewvc/llvm-project?rev=340873&view=rev Log: [HIP] Fix output file extension OffloadBundlingJobAction constructor accepts a list of JobAction as inputs. The host JobAction is the last one. The file type of Off

r340967 - Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Aug 29 13:39:22 2018 New Revision: 340967 URL: http://llvm.org/viewvc/llvm-project?rev=340967&view=rev Log: Add predefined macro __gnu_linux__ for proper aux-triple Clang predefine macro __linx__ for aux-triple with Linux OS but does not predefine macro __gnu_linux__. Thi

r341077 - [HIP] Add -fvisibility hidden option to clang

2018-08-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Aug 30 08:10:20 2018 New Revision: 341077 URL: http://llvm.org/viewvc/llvm-project?rev=341077&view=rev Log: [HIP] Add -fvisibility hidden option to clang AMDGPU target need -fvisibility hidden option for clang to work around a limitation of no PLT support, otherwise there

r337540 - Sema: Fix explicit address space cast in C++

2018-07-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jul 20 04:32:51 2018 New Revision: 337540 URL: http://llvm.org/viewvc/llvm-project?rev=337540&view=rev Log: Sema: Fix explicit address space cast in C++ Currently clang does not allow implicit cast of a pointer to a pointer type in different address space but allows C-sty

r337631 - [HIP] Register/unregister device fat binary only once

2018-07-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jul 20 15:45:24 2018 New Revision: 337631 URL: http://llvm.org/viewvc/llvm-project?rev=337631&view=rev Log: [HIP] Register/unregister device fat binary only once HIP generates one fat binary for all devices after linking. However, for each compilation unit a ctor functio

r337639 - [HIP] Support -fcuda-flush-denormals-to-zero for amdgcn

2018-07-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jul 20 19:02:22 2018 New Revision: 337639 URL: http://llvm.org/viewvc/llvm-project?rev=337639&view=rev Log: [HIP] Support -fcuda-flush-denormals-to-zero for amdgcn Differential Revision: https://reviews.llvm.org/D48287 Modified: cfe/trunk/include/clang/Basic/LangOpti

r337791 - Enable .hip files for test/Driver

2018-07-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jul 23 18:03:44 2018 New Revision: 337791 URL: http://llvm.org/viewvc/llvm-project?rev=337791&view=rev Log: Enable .hip files for test/Driver Partially revert r334128 due to regressions. Modified: cfe/trunk/lib/Driver/Driver.cpp cfe/trunk/test/Driver/lit.local.cf

r337793 - [HIP] pass -target-cpu when running the device-mode compiler

2018-07-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jul 23 18:40:44 2018 New Revision: 337793 URL: http://llvm.org/viewvc/llvm-project?rev=337793&view=rev Log: [HIP] pass -target-cpu when running the device-mode compiler Differential Revision: https://reviews.llvm.org/D49643 Modified: cfe/trunk/lib/Driver/ToolChains/H

r337797 - Attempt to fix regression due to r337791

2018-07-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jul 23 19:12:24 2018 New Revision: 337797 URL: http://llvm.org/viewvc/llvm-project?rev=337797&view=rev Log: Attempt to fix regression due to r337791 Modified: cfe/trunk/test/Driver/hip-toolchain.hip Modified: cfe/trunk/test/Driver/hip-toolchain.hip URL: http://llvm.

r338188 - [CUDA][HIP] Allow function-scope static const variable

2018-07-27 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jul 27 20:05:25 2018 New Revision: 338188 URL: http://llvm.org/viewvc/llvm-project?rev=338188&view=rev Log: [CUDA][HIP] Allow function-scope static const variable CUDA 8.0 E.3.9.4 says: Within the body of a __device__ or __global__ function, only __shared__ variables or v

r338805 - Sema: Fix explicit address space cast involving void pointers

2018-08-02 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Aug 2 20:18:56 2018 New Revision: 338805 URL: http://llvm.org/viewvc/llvm-project?rev=338805&view=rev Log: Sema: Fix explicit address space cast involving void pointers Explicit cast of a void pointer to a pointer type in different address space is incorrectly classified

r325031 - [AMDGPU] Change constant addr space to 4

2018-02-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Feb 13 10:01:21 2018 New Revision: 325031 URL: http://llvm.org/viewvc/llvm-project?rev=325031&view=rev Log: [AMDGPU] Change constant addr space to 4 Differential Revision: https://reviews.llvm.org/D43171 Added: cfe/trunk/test/CodeGenOpenCL/amdgpu-env-amdgcn.cl Remove

r325264 - [OpenCL] Fix __enqueue_block for block with captures

2018-02-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 15 08:39:19 2018 New Revision: 325264 URL: http://llvm.org/viewvc/llvm-project?rev=325264&view=rev Log: [OpenCL] Fix __enqueue_block for block with captures The following test case causes issue with codegen of __enqueue_block void (^block)(void) = ^{ callee(id, out);

r325279 - Clean up AMDGCN tests

2018-02-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 15 11:12:41 2018 New Revision: 325279 URL: http://llvm.org/viewvc/llvm-project?rev=325279&view=rev Log: Clean up AMDGCN tests Differential Revision: https://reviews.llvm.org/D43340 Modified: cfe/trunk/test/CodeGen/address-space.c cfe/trunk/test/CodeGenCXX/cxx

r305711 - CodeGen: Cast temporary variable to proper address space

2017-06-19 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jun 19 12:03:41 2017 New Revision: 305711 URL: http://llvm.org/viewvc/llvm-project?rev=305711&view=rev Log: CodeGen: Cast temporary variable to proper address space In C++ all variables are in default address space. Previously change has been made to cast automatic variab

r326725 - [AMDGPU] Clean up old address space mapping and fix constant address space value

2018-03-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Mar 5 09:50:10 2018 New Revision: 326725 URL: http://llvm.org/viewvc/llvm-project?rev=326725&view=rev Log: [AMDGPU] Clean up old address space mapping and fix constant address space value Differential Revision: https://reviews.llvm.org/D43911 Modified: cfe/trunk/lib

r326937 - [OpenCL] Remove block invoke function from emitted block literal struct

2018-03-07 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 7 11:32:58 2018 New Revision: 326937 URL: http://llvm.org/viewvc/llvm-project?rev=326937&view=rev Log: [OpenCL] Remove block invoke function from emitted block literal struct OpenCL runtime tracks the invoke function emitted for any block expression. Due to restricti

r326946 - CodeGen: Fix address space of indirect function argument

2018-03-07 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 7 13:45:40 2018 New Revision: 326946 URL: http://llvm.org/viewvc/llvm-project?rev=326946&view=rev Log: CodeGen: Fix address space of indirect function argument The indirect function argument is in alloca address space in LLVM IR. However, during Clang codegen for C++

r327515 - CodeGen: Reduce LValue and CallArgList memory footprint before recommitting r326946

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 08:02:28 2018 New Revision: 327515 URL: http://llvm.org/viewvc/llvm-project?rev=327515&view=rev Log: CodeGen: Reduce LValue and CallArgList memory footprint before recommitting r326946 Recent change r326946 (https://reviews.llvm.org/D34367) causes regression in E

r327516 - Add deep AST tree test for r327515

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 08:03:31 2018 New Revision: 327516 URL: http://llvm.org/viewvc/llvm-project?rev=327516&view=rev Log: Add deep AST tree test for r327515 Added: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cpp Added: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cpp URL: http://llvm.org/

r327529 - Attempt to fix failure of deep-ast-tree.cpp on ppc64 and atom

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 09:47:49 2018 New Revision: 327529 URL: http://llvm.org/viewvc/llvm-project?rev=327529&view=rev Log: Attempt to fix failure of deep-ast-tree.cpp on ppc64 and atom Modified: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cpp Modified: cfe/trunk/test/CodeGenCXX/deep-as

r327547 - Attempt to fix failure of deep-ast-tree.cpp on atom and s390

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 11:24:38 2018 New Revision: 327547 URL: http://llvm.org/viewvc/llvm-project?rev=327547&view=rev Log: Attempt to fix failure of deep-ast-tree.cpp on atom and s390 Modified: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cpp Modified: cfe/trunk/test/CodeGenCXX/deep-ast

r327570 - Reduce AST depth for test deep-ast-tree.cpp for atom

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 13:41:05 2018 New Revision: 327570 URL: http://llvm.org/viewvc/llvm-project?rev=327570&view=rev Log: Reduce AST depth for test deep-ast-tree.cpp for atom Modified: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cpp Modified: cfe/trunk/test/CodeGenCXX/deep-ast-tree.cp

r327578 - Remove test deep-ast-tree.cpp

2018-03-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Mar 14 14:40:55 2018 New Revision: 327578 URL: http://llvm.org/viewvc/llvm-project?rev=327578&view=rev Log: Remove test deep-ast-tree.cpp Since there is no reliable way to change the AST depth of this test by supported stack size of the test environment, remove this test

r327634 - Recommit r326946 after reducing CallArgList memory footprint

2018-03-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Mar 15 08:25:19 2018 New Revision: 327634 URL: http://llvm.org/viewvc/llvm-project?rev=327634&view=rev Log: Recommit r326946 after reducing CallArgList memory footprint Added: cfe/trunk/test/CodeGenCXX/amdgcn-func-arg.cpp Modified: cfe/trunk/lib/CodeGen/CGAtomic.c

r334021 - [CUDA][HIP] Do not emit type info when compiling for device

2018-06-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 5 08:11:02 2018 New Revision: 334021 URL: http://llvm.org/viewvc/llvm-project?rev=334021&view=rev Log: [CUDA][HIP] Do not emit type info when compiling for device CUDA/HIP does not support RTTI on device side, therefore there is no point of emitting type info when co

r334128 - [HIP] Fix unbundling

2018-06-06 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Jun 6 12:44:10 2018 New Revision: 334128 URL: http://llvm.org/viewvc/llvm-project?rev=334128&view=rev Log: [HIP] Fix unbundling HIP uses clang-offload-bundler to bundle intermediate files for host and different gpu archs together. When a file is unbundled, clang-offload-

r334457 - [CUDA][HIP] Set kernel calling convention before arrange function

2018-06-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jun 11 17:16:33 2018 New Revision: 334457 URL: http://llvm.org/viewvc/llvm-project?rev=334457&view=rev Log: [CUDA][HIP] Set kernel calling convention before arrange function Currently clang set kernel calling convention for CUDA/HIP after arranging function, which causes

r334561 - [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes

2018-06-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 12 16:58:59 2018 New Revision: 334561 URL: http://llvm.org/viewvc/llvm-project?rev=334561&view=rev Log: [CUDA][HIP] Allow CUDA __global__ functions to have amdgpu kernel attributes There are HIP applications e.g. Tensorflow 1.3 using amdgpu kernel attributes, however

r334837 - [NFC] Add CreateMemTempWithoutCast and CreateTempAllocaWithoutCast

2018-06-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jun 15 08:33:22 2018 New Revision: 334837 URL: http://llvm.org/viewvc/llvm-project?rev=334837&view=rev Log: [NFC] Add CreateMemTempWithoutCast and CreateTempAllocaWithoutCast This is partial re-commit of r332982 Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trun

r334879 - Call CreateTempAllocaWithoutCast for ActiveFlag

2018-06-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jun 15 18:20:52 2018 New Revision: 334879 URL: http://llvm.org/viewvc/llvm-project?rev=334879&view=rev Log: Call CreateTempAllocaWithoutCast for ActiveFlag This is partial re-commit of r332982. Modified: cfe/trunk/lib/CodeGen/CGCleanup.cpp Modified: cfe/trunk/lib/Co

r334886 - Add RUN line for amdgcn to lit test conditional-temporaries.cpp

2018-06-16 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Sat Jun 16 05:28:51 2018 New Revision: 334886 URL: http://llvm.org/viewvc/llvm-project?rev=334886&view=rev Log: Add RUN line for amdgcn to lit test conditional-temporaries.cpp This is partial re-commit of r332982. Modified: cfe/trunk/test/CodeGenCXX/conditional-temporari

r344057 - [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors

2018-10-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 9 08:53:14 2018 New Revision: 344057 URL: http://llvm.org/viewvc/llvm-project?rev=344057&view=rev Log: [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors ShouldDeleteSpecialMember is called upon inherited constructors. It calls inferCUDATargetForImp

r344630 - Disable code object version 3 for HIP toolchain

2018-10-16 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 16 10:36:23 2018 New Revision: 344630 URL: http://llvm.org/viewvc/llvm-project?rev=344630&view=rev Log: Disable code object version 3 for HIP toolchain AMDGPU backend will switch to code object version 3 by default. Since HIP runtime is not ready, disable it until the

r344665 - AMDGPU: add __builtin_amdgcn_update_dpp

2018-10-16 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 16 19:32:26 2018 New Revision: 344665 URL: http://llvm.org/viewvc/llvm-project?rev=344665&view=rev Log: AMDGPU: add __builtin_amdgcn_update_dpp Emit llvm.amdgcn.update.dpp for both __builtin_amdgcn_mov_dpp and __builtin_amdgcn_update_dpp. The first argument to llvm.am

r344996 - Add gfx904 and gfx906 to GPU Arch

2018-10-22 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Oct 22 19:05:31 2018 New Revision: 344996 URL: http://llvm.org/viewvc/llvm-project?rev=344996&view=rev Log: Add gfx904 and gfx906 to GPU Arch Differential Revision: https://reviews.llvm.org/D53472 Modified: cfe/trunk/include/clang/Basic/Cuda.h cfe/trunk/lib/Basic

r352488 - [CUDA][HIP] Do not diagnose use of _Float16

2019-01-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jan 29 05:20:23 2019 New Revision: 352488 URL: http://llvm.org/viewvc/llvm-project?rev=352488&view=rev Log: [CUDA][HIP] Do not diagnose use of _Float16 r352221 caused regressions in CUDA/HIP since device function may use _Float16 whereas host does not support it. In this

r352620 - [HIP] Fix size_t for MSVC environment

2019-01-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Jan 30 04:26:54 2019 New Revision: 352620 URL: http://llvm.org/viewvc/llvm-project?rev=352620&view=rev Log: [HIP] Fix size_t for MSVC environment In 64 bit MSVC environment size_t is defined as unsigned long long. In single source language like HIP, data layout should be

r346413 - Fix bitcast to address space cast for coerced load/stores

2018-11-08 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Nov 8 08:55:46 2018 New Revision: 346413 URL: http://llvm.org/viewvc/llvm-project?rev=346413&view=rev Log: Fix bitcast to address space cast for coerced load/stores Coerced load/stores through memory do not take into account potential address space differences when it c

r346536 - [HIP] Remove useless sections in linked files

2018-11-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Nov 9 10:52:05 2018 New Revision: 346536 URL: http://llvm.org/viewvc/llvm-project?rev=346536&view=rev Log: [HIP] Remove useless sections in linked files clang-offload-bundler creates __CLANG_OFFLOAD_BUNDLE__* sections in the bundles, which get into the linked files. Thes

r346828 - [HIP] Fix device only compilation

2018-11-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Nov 13 20:47:31 2018 New Revision: 346828 URL: http://llvm.org/viewvc/llvm-project?rev=346828&view=rev Log: [HIP] Fix device only compilation Fix a bug causing host code being compiled when --cude-device-only is set. Differential Revision: https://reviews.llvm.org/D54496

r354893 - [OpenCL] Fix assertion due to blocks

2019-02-26 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Feb 26 08:20:41 2019 New Revision: 354893 URL: http://llvm.org/viewvc/llvm-project?rev=354893&view=rev Log: [OpenCL] Fix assertion due to blocks A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called. There is code Func = CGM.ge

r354929 - [CUDA][HIP] Check calling convention based on function target

2019-02-26 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Feb 26 14:24:49 2019 New Revision: 354929 URL: http://llvm.org/viewvc/llvm-project?rev=354929&view=rev Log: [CUDA][HIP] Check calling convention based on function target MSVC header files using vectorcall to differentiate overloaded functions, which causes failure for AMD

r354948 - [HIP] change kernel stub name

2019-02-26 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Feb 26 18:02:52 2019 New Revision: 354948 URL: http://llvm.org/viewvc/llvm-project?rev=354948&view=rev Log: [HIP] change kernel stub name Add .stub to kernel stub function name so that it is different from kernel name in device code. This is necessary to let debugger find

r354990 - [NFC] minor revision of r354929 [CUDA][HIP] Check calling convention based on function target

2019-02-27 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Feb 27 07:46:29 2019 New Revision: 354990 URL: http://llvm.org/viewvc/llvm-project?rev=354990&view=rev Log: [NFC] minor revision of r354929 [CUDA][HIP] Check calling convention based on function target Add comments and move a variable to if block. Differential Revision:

r355106 - Partial revert of r353952: [HIP] Handle compile -m options and propagate into LLC

2019-02-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 28 09:08:26 2019 New Revision: 355106 URL: http://llvm.org/viewvc/llvm-project?rev=355106&view=rev Log: Partial revert of r353952: [HIP] Handle compile -m options and propagate into LLC Remove comments and tests about passing -mcode-object-v3 to driver since it does

r355410 - [HIP] Do not unbundle object files for -fno-gpu-rdc

2019-03-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Mar 5 08:07:56 2019 New Revision: 355410 URL: http://llvm.org/viewvc/llvm-project?rev=355410&view=rev Log: [HIP] Do not unbundle object files for -fno-gpu-rdc When -fno-gpu-rdc is set, device code is compiled, linked, and assembled into fat binary and embedded as string

r355419 - Allow bundle size to be 0 in clang-offload-bundler

2019-03-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Mar 5 09:52:32 2019 New Revision: 355419 URL: http://llvm.org/viewvc/llvm-project?rev=355419&view=rev Log: Allow bundle size to be 0 in clang-offload-bundler HIP uses clang-offload-bundler to create fat binary. The bundle for host is empty. Currently clang-offload-bundl

r355421 - [CUDA][HIP][Sema] Fix template kernel with function as template parameter

2019-03-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Mar 5 10:19:35 2019 New Revision: 355421 URL: http://llvm.org/viewvc/llvm-project?rev=355421&view=rev Log: [CUDA][HIP][Sema] Fix template kernel with function as template parameter If a kernel template has a function as its template parameter, a device function should b

r358290 - [HIP] Use -mlink-builtin-bitcode to link device library

2019-04-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Apr 12 09:23:31 2019 New Revision: 358290 URL: http://llvm.org/viewvc/llvm-project?rev=358290&view=rev Log: [HIP] Use -mlink-builtin-bitcode to link device library Use -mlink-builtin-bitcode instead of llvm-link to link device library so that device library bitcode and us

r359594 - AMDGPU: Enable _Float16

2019-04-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 30 11:35:37 2019 New Revision: 359594 URL: http://llvm.org/viewvc/llvm-project?rev=359594&view=rev Log: AMDGPU: Enable _Float16 Added: cfe/trunk/test/CodeGenCXX/amdgpu-float16.cpp Modified: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp Modified: cfe/trunk/lib/Basic/

r359598 - Add requires amdgpu-registered-target for amdgpu-float16.cpp

2019-04-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 30 12:06:15 2019 New Revision: 359598 URL: http://llvm.org/viewvc/llvm-project?rev=359598&view=rev Log: Add requires amdgpu-registered-target for amdgpu-float16.cpp Modified: cfe/trunk/test/CodeGenCXX/amdgpu-float16.cpp Modified: cfe/trunk/test/CodeGenCXX/amdgpu-

r343611 - [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-02 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Oct 2 10:48:54 2018 New Revision: 343611 URL: http://llvm.org/viewvc/llvm-project?rev=343611&view=rev Log: [HIP] Support early finalization of device code for -fno-gpu-rdc This patch renames -f{no-}cuda-rdc to -f{no-}gpu-rdc and keeps the original options as aliases. Whe

r352801 - Do not copy long double and 128-bit fp format from aux target for AMDGPU

2019-01-31 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Jan 31 13:57:51 2019 New Revision: 352801 URL: http://llvm.org/viewvc/llvm-project?rev=352801&view=rev Log: Do not copy long double and 128-bit fp format from aux target for AMDGPU rC352620 caused regressions because it copied floating point format from aux target. float

r354004 - [CUDA][HIP] Use device side kernel and variable names when registering them

2019-02-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Feb 13 18:00:09 2019 New Revision: 354004 URL: http://llvm.org/viewvc/llvm-project?rev=354004&view=rev Log: [CUDA][HIP] Use device side kernel and variable names when registering them __hipRegisterFunction and __hipRegisterVar need to accept device side kernel and variab

r354615 - [HIP] change kernel stub name

2019-02-21 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 21 12:12:16 2019 New Revision: 354615 URL: http://llvm.org/viewvc/llvm-project?rev=354615&view=rev Log: [HIP] change kernel stub name Add .stub to kernel stub function name so that it is different from kernel name in device code. This is necessary to let debugger find

r354651 - revert r354615: [HIP] change kernel stub name

2019-02-21 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 21 20:20:12 2019 New Revision: 354651 URL: http://llvm.org/viewvc/llvm-project?rev=354651&view=rev Log: revert r354615: [HIP] change kernel stub name It caused regressions. Differential Revision: https://reviews.llvm.org/D58518 Modified: cfe/trunk/lib/CodeGen/CG

r312441 - [OpenCL] Do not use vararg in emitted functions for enqueue_kernel

2017-09-03 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Sun Sep 3 06:52:24 2017 New Revision: 312441 URL: http://llvm.org/viewvc/llvm-project?rev=312441&view=rev Log: [OpenCL] Do not use vararg in emitted functions for enqueue_kernel Not all targets support vararg (e.g. amdgpu). Instead of using vararg in the emitted functions f

r313171 - [AMDGPU] Change addr space of clk_event_t, queue_t and reserve_id_t to global

2017-09-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Sep 13 11:50:42 2017 New Revision: 313171 URL: http://llvm.org/viewvc/llvm-project?rev=313171&view=rev Log: [AMDGPU] Change addr space of clk_event_t, queue_t and reserve_id_t to global Differential Revision: https://reviews.llvm.org/D37703 Modified: cfe/trunk/lib/Ba

r313172 - Add more tests for OpenCL atomic builtin functions

2017-09-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Sep 13 11:56:25 2017 New Revision: 313172 URL: http://llvm.org/viewvc/llvm-project?rev=313172&view=rev Log: Add more tests for OpenCL atomic builtin functions Add tests for different address spaces and insert some blank lines to make them more readable. Differential Rev

r363076 - Revert r344630 Disable code object version 3 for HIP toolchain.

2019-06-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 11 08:05:11 2019 New Revision: 363076 URL: http://llvm.org/viewvc/llvm-project?rev=363076&view=rev Log: Revert r344630 Disable code object version 3 for HIP toolchain. Remove the workaround so that by default code object v3 is enabled. Modified: cfe/trunk/lib/Dri

r363414 - [AMDGPU] Enable the implicit arguments for HIP (CLANG)

2019-06-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Jun 14 08:54:47 2019 New Revision: 363414 URL: http://llvm.org/viewvc/llvm-project?rev=363414&view=rev Log: [AMDGPU] Enable the implicit arguments for HIP (CLANG) Enable 48-bytes of implicit arguments for HIP as well. Earlier it was enabled for OpenCL. This code is speci

r364380 - Fix build failure due to missing break

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:33:03 2019 New Revision: 364380 URL: http://llvm.org/viewvc/llvm-project?rev=364380&view=rev Log: Fix build failure due to missing break Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp URL: http://llvm.org/viewvc

r364381 - [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:47:37 2019 New Revision: 364381 URL: http://llvm.org/viewvc/llvm-project?rev=364381&view=rev Log: [HIP] Support attribute hip_pinned_shadow This patch introduces support of hip_pinned_shadow variable for HIP. A hip_pinned_shadow variable is a global variable wi

r365799 - [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012

2019-07-11 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Jul 11 10:50:09 2019 New Revision: 365799 URL: http://llvm.org/viewvc/llvm-project?rev=365799&view=rev Log: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 Differential Revision: https://reviews.llvm.org/D64364 Modified: cfe/trunk/include/clang/Basic/Cuda.h cfe/

r361757 - [OpenCL] Fix file-scope const sampler variable for 2.0

2019-05-27 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon May 27 04:19:07 2019 New Revision: 361757 URL: http://llvm.org/viewvc/llvm-project?rev=361757&view=rev Log: [OpenCL] Fix file-scope const sampler variable for 2.0 OpenCL spec v2.0 s6.13.14: Samplers can also be declared as global constants in the program source using the

r361880 - [CUDA][HIP] Emit dependent libs for host only

2019-05-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 28 14:18:59 2019 New Revision: 361880 URL: http://llvm.org/viewvc/llvm-project?rev=361880&view=rev Log: [CUDA][HIP] Emit dependent libs for host only Recently D60274 was introduced to allow lld to handle dependent libs. However current usage of dependent libs (e.g. p

r361905 - Fix failure of lit test dependent-libs.cu

2019-05-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue May 28 18:34:44 2019 New Revision: 361905 URL: http://llvm.org/viewvc/llvm-project?rev=361905&view=rev Log: Fix failure of lit test dependent-libs.cu Modified: cfe/trunk/test/CodeGenCUDA/dependent-libs.cu Modified: cfe/trunk/test/CodeGenCUDA/dependent-libs.cu URL: h

r350885 - [HIP] Use nul instead of /dev/null when running on windows

2019-01-10 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Jan 10 12:09:52 2019 New Revision: 350885 URL: http://llvm.org/viewvc/llvm-project?rev=350885&view=rev Log: [HIP] Use nul instead of /dev/null when running on windows When clang is running on windows, /dev/null is not available. Use nul as empty input file instead. Diff

r372394 - [CUDA][HIP] Fix hostness of defaulted constructor

2019-09-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Sep 20 07:28:09 2019 New Revision: 372394 URL: http://llvm.org/viewvc/llvm-project?rev=372394&view=rev Log: [CUDA][HIP] Fix hostness of defaulted constructor Clang does not respect the explicit device host attributes of defaulted special members. Also clang does not respe

r372452 - Revert assertion added by r372394

2019-09-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Sep 20 19:51:44 2019 New Revision: 372452 URL: http://llvm.org/viewvc/llvm-project?rev=372452&view=rev Log: Revert assertion added by r372394 The assertion added by r372394 causes CUDA test in test-suite to assert. The assertion was not there originally, so revert it.

r372773 - [HIP] Support new kernel launching API

2019-09-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Sep 24 12:16:40 2019 New Revision: 372773 URL: http://llvm.org/viewvc/llvm-project?rev=372773&view=rev Log: [HIP] Support new kernel launching API Differential Revision: https://reviews.llvm.org/D67947 Modified: cfe/trunk/include/clang/Basic/LangOptions.def cfe/t

r373561 - [HIP] Support -emit-llvm for device compilation

2019-10-02 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Oct 2 20:27:43 2019 New Revision: 373561 URL: http://llvm.org/viewvc/llvm-project?rev=373561&view=rev Log: [HIP] Support -emit-llvm for device compilation Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since there ar

r373649 - [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Oct 3 11:59:56 2019 New Revision: 373649 URL: http://llvm.org/viewvc/llvm-project?rev=373649&view=rev Log: [HIP] Use option -nogpulib to disable linking device lib Differential Revision: https://reviews.llvm.org/D68300 Added: cfe/trunk/test/Driver/hip-no-device-libs

r330279 - [HIP] Add driver input type for HIP

2018-04-18 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Apr 18 11:25:03 2018 New Revision: 330279 URL: http://llvm.org/viewvc/llvm-project?rev=330279&view=rev Log: [HIP] Add driver input type for HIP Patch by Greg Rodgers. Revised by Yaxun Liu. Differential Revision: https://reviews.llvm.org/D45489 Modified: cfe/trunk/in

r330447 - [CUDA] Set LLVM calling convention for CUDA kernel

2018-04-20 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Apr 20 10:01:03 2018 New Revision: 330447 URL: http://llvm.org/viewvc/llvm-project?rev=330447&view=rev Log: [CUDA] Set LLVM calling convention for CUDA kernel Some targets need special LLVM calling convention for CUDA kernel. This patch does that through a TargetCodeGenIn

  1   2   3   4   5   6   7   8   9   10   >