Mirror of official llvm git repository located at http://llvm.org/git/llvm. Updated every five minutes.
Go to file
Philip Reames 33ee99ac22 [LICM] Make store promotion work in the face of unordered atomics
Extend our store promotion code to deal with unordered atomic accesses. Ordered atomics continue to be unhandled.

Most of the change is straight-forward, the only complicated bit is in the reasoning around mixing of atomic and non-atomic memory access. Rather than trying to reason about the complex semantics in these cases, I simply disallowed promotion when both atomic and non-atomic accesses are present. This is conservatively correct.

It seems really tempting to just promote all access to atomics, but the original accesses might have been conditional. Since we can't lower an arbitrary atomic type, it might not be safe to promote all access to atomic. Consider a loop like the following:
while(b) {
  load i128 ...
  if (can lower i128 atomic)
    store atomic i128 ...
  else
    store i128
}

It could be there's no race on the location and thus the code is perfectly well defined even if we can't lower a i128 atomically. 

It's not clear we need to be this conservative - arguably the program above is brocken since it can't be lowered unless the branch is folded - but I didn't want to have to fix any fallout which might result.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295015 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 01:38:31 +00:00
bindings Fix go bindings after r289702 (hopefully, don't really know how to build 2016-12-15 06:54:29 +00:00
cmake config-ix.cmake: Search for CMAKE_XCRUN before using it. 2017-02-11 00:14:01 +00:00
docs [LangRef] Explicitly allow readnone and reaodnly functions to unwind 2017-02-13 23:19:07 +00:00
examples Kaleidoscope-Ch7: Add TranformUtils for llvm::createPromoteMemoryToRegisterPass() added in r294870. 2017-02-12 01:18:32 +00:00
include Undef MemoryFence, which is defined to _mm_mfence by winnt.h 2017-02-14 01:38:14 +00:00
lib [LICM] Make store promotion work in the face of unordered atomics 2017-02-14 01:38:31 +00:00
projects [CMake] Correct configuration order of the sub-projects based on ther dependancies 2016-10-09 20:38:29 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
runtimes [CMake] Handle common options for runtimes build 2017-01-10 19:47:05 +00:00
test [LICM] Make store promotion work in the face of unordered atomics 2017-02-14 01:38:31 +00:00
tools [llvm-lto2] Fix typo spotted by Teresa (r294885 post-commit review). 2017-02-13 16:08:36 +00:00
unittests Silence redundant semicolon warnings. NFC. 2017-02-13 23:42:27 +00:00
utils vim: add returned keyword 2017-02-10 23:57:11 +00:00
.arcconfig project_id is from another era in phabricator land and does not provide any value. 2016-09-27 15:47:29 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitignore [AVR] Add the integrated testing tool to the .gitignore 2016-12-14 11:47:14 +00:00
CMakeLists.txt [CMake] Allow overriding CMAKE_LIBTOOL 2017-02-07 23:32:56 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Update email address 2017-02-09 21:29:12 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT Revert r294228 2017-02-06 19:40:56 +00:00
LICENSE.TXT Bump year to 2017 in LICENSE.txt 2017-01-12 18:02:42 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
README.txt Test commit: remove a blank line. 2017-02-03 10:56:57 +00:00
RELEASE_TESTERS.TXT Update the release tester for MIPS. NFC. 2017-01-17 11:00:28 +00:00

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.