llvm-project/llvm
Akira Hatanaka 6fdcb3c2ce [ObjCARC] Do not move a release between a call and a
retainAutoreleasedReturnValue that retains the returned value.

This commit fixes a bug in ARC optimizer where it moves a release
between a call and a retainAutoreleasedReturnValue, causing the returned
object to be released before the retainAutoreleasedReturnValue can
retain it.

This commit accomplishes that by doing a lookahead and checking whether
the call prevents the release from moving upwards. In the long term, we
should treat the region between the retainAutoreleasedReturnValue and
the call as a critical section and disallow moving anything there
(possibly using operand bundles).

rdar://problem/20449878

llvm-svn: 301724
2017-04-29 00:23:11 +00:00
..
bindings [go bindings] Rmove duplicated conversion function definitions after r300843. 2017-04-20 19:06:11 +00:00
cmake limit to 2 parallel links when using thinlto 2017-04-28 20:17:15 +00:00
docs Add speculatable function attribute 2017-04-28 20:25:27 +00:00
examples Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
include [Support] Provide unsafe random access for VarStreamArray. 2017-04-28 23:29:33 +00:00
lib [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
projects
resources
runtimes [CMake][runtimes] Use -nodefaultlibs for the runtimes build 2017-04-13 21:29:03 +00:00
test [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
tools [llvm-readobj] Fix incorrect printing of CV column info. 2017-04-29 00:03:32 +00:00
unittests Revert r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" 2017-04-28 23:01:32 +00:00
utils TableGen: Add IntrHasSideEffects property for intrinsics 2017-04-28 21:01:46 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Allow suppressing host and target info in VersionPrinter 2017-04-19 00:03:36 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.