Go to file
Marco Antognini 06d9d070c7 Derive builtin return type from its definition
Summary:
Prior to this patch, OpenCL code such as the following would attempt to create
a BranchInst with a non-bool argument:

    if (enqueue_kernel(get_default_queue(), 0, nd, ^(void){})) /* ... */

This patch is a follow up on a similar issue with pipe builtin
operations. See commit r280800 and https://bugs.llvm.org/show_bug.cgi?id=30219.

This change, while being conservative on non-builtin functions,
should set the type of expressions invoking builtins to the
proper type, instead of defaulting to `bool` and requiring
manual overrides in Sema::CheckBuiltinFunctionCall.

In addition to tests for enqueue_kernel, the tests are extended to
check other OpenCL builtins.

Reviewers: Anastasia, spatel, rsmith

Reviewed By: Anastasia

Subscribers: kristina, cfe-commits, svenvh

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

llvm-svn: 347658
2018-11-27 14:54:58 +00:00
clang Derive builtin return type from its definition 2018-11-27 14:54:58 +00:00
clang-tools-extra Revert r347419 "Update call to EvaluateAsInt() to the new syntax." 2018-11-27 14:15:37 +00:00
compiler-rt [CMake] Add a missing case of TO_CMAKE_PATH 2018-11-27 09:23:15 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc r600: Add datalayout to image builtin implementation 2018-11-10 21:43:40 +00:00
libcxx Remove duplicate _LIBCPP_INLINE_VISIBILITY attributes. 2018-11-26 22:51:35 +00:00
libcxxabi [CMake] Passthrough CFLAGS when checking the compiler-rt path 2018-11-14 00:09:26 +00:00
libunwind [CMake] Passthrough CFLAGS when checking the compiler-rt path 2018-11-14 00:09:26 +00:00
lld [ELF] - Fix R_AARCH64_ADR_GOT_PAGE, R_AARCH64_LD64_GOT_LO12 handling against IFUNC symbols. 2018-11-27 10:30:46 +00:00
lldb Add support for the Dylan language to ClangASTContext 2018-11-27 05:37:27 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm InstCombine: add comment explaining malloc deletion. NFC. 2018-11-27 11:08:14 +00:00
openmp [OPENMP][NVPTX]Improved lock/critical constructs. 2018-11-20 20:19:36 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.