Go to file
Brian Gesiak b963c5150d [AMDGPU] Fix discarded result of addAttribute
Summary:
`llvm::AttributeList` and `llvm::AttributeSet` are immutable, and so methods
defined on these classes, such as `addAttribute`, return a new immutable
object with the attribute added. In https://reviews.llvm.org/D55217 I attempted
to annotate methods such as `addAttribute` with `LLVM_NODISCARD`, since
calling these methods has no side-effects, and so ignoring the result
that is returned is almost certainly a programmer error.

However, committing the change resulted in new warnings in the AMDGPU target.
The AMDGPU simplify libcalls pass added in https://reviews.llvm.org/D36436
attempts to add the readonly and nounwind attributes to simplified
library functions, but instead calls the `addAttribute` methods and
ignores the result.

Modify the simplify libcalls pass to actually add the nounwind and
readonly attributes. Also update the simplify libcalls test to assert
that these attributes are actually being set.

Reviewers: rampitec, vpykhtin, rnk

Reviewed By: rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 348732
2018-12-09 21:56:50 +00:00
clang Move the make_const_ptr trait into STLExtras; use add_pointer where possible; NFC. 2018-12-09 19:53:24 +00:00
clang-tools-extra [Documentation] Alphabetical order in new checks list. 2018-12-08 00:07:34 +00:00
compiler-rt Fix conflict types for this FreeBSD test. 2018-12-08 16:29:50 +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 travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx Update a couple of vector<bool> tests that were testing libc++-specific bahavior. Thanks to Andrey Maksimov for the catch. 2018-12-07 22:16:26 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [CMake] Passthrough CFLAGS when checking the compiler-rt path 2018-11-14 00:09:26 +00:00
lld [WebAssembly] Add support for the event section 2018-12-08 06:17:43 +00:00
lldb Revert a hunk that shouldn't have been included in the last commit. 2018-12-09 02:38:04 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [AMDGPU] Fix discarded result of addAttribute 2018-12-09 21:56:50 +00:00
openmp Add OpenBSD support to OpenMP 2018-12-09 16:46:48 +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.