llvm-project/clang/lib
Yaxun Liu b7318e02c1 [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 OpenCL
in AST. There are two issues with this:

Multiple address spaces including private address space cannot be diagnosed.
There is no mangling for default address space. For example, if private int* is emitted as
i32 addrspace(5)* in IR. It is supposed to be mangled as PUAS5i but it is mangled as
Pi instead.

This patch attempts to represent OpenCL private address space explicitly in AST. It adds
a new enum LangAS::opencl_private and adds it to the variable types which are implicitly
private:

automatic variables without address space qualifier

function parameter

pointee type without address space qualifier (OpenCL 1.2 and below)

Differential Revision: https://reviews.llvm.org/D35082

llvm-svn: 315668
2017-10-13 03:37:48 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
ASTMatchers [ASTMatchers] Don't create a copy of a std::set when iterating over it. 2017-10-10 07:21:34 +00:00
Analysis [Analyzer] Support bodyfarming libstdc++ implementation of std::call_once. 2017-10-11 20:53:01 +00:00
Basic [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
CodeGen [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
CrossTU Fix implicit-fallthrough warning by adding missing break 2017-09-24 15:17:46 +00:00
Driver Revert "[ADT] Make Twine's copy constructor private." 2017-10-11 23:54:34 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format [clang-format] Fix regression about short functions after #else 2017-10-02 15:53:37 +00:00
Frontend Support for destroying operator delete, per C++2a proposal P0722. 2017-10-13 01:55:36 +00:00
FrontendTool Update after LLVM change r309087 2017-07-26 09:10:17 +00:00
Headers [X86] Add CLWB intrinsic. clang part 2017-10-12 18:57:15 +00:00
Index Fix indexer crash for default template template parameter value 2017-10-10 21:09:49 +00:00
Lex Fix warnings. [-Wdocumentation] 2017-10-12 09:42:14 +00:00
Parse [OpenCL] Allow function declaration with empty argument list. 2017-10-11 11:16:31 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
Serialization Support for destroying operator delete, per C++2a proposal P0722. 2017-10-13 01:55:36 +00:00
StaticAnalyzer [Analyzer] Assume that CFBooleanRef const globals are non-null 2017-10-13 00:51:41 +00:00
Tooling Recommit r315087 "[refactor] add support for refactoring options" 2017-10-13 01:53:13 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00