1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Go to file
Adam Nemet d781df9057 [LoopVersioning] Annotate versioned loop with noalias metadata
Summary:
If we decide to version a loop to benefit a transformation, it makes
sense to record the now non-aliasing accesses in the newly versioned
loop.  This allows non-aliasing information to be used by subsequent
passes.

One example is 456.hmmer in SPECint2006 where after loop distribution,
we vectorize one of the newly distributed loops.  To vectorize we
version this loop to fully disambiguate may-aliasing accesses.  If we
add the noalias markers, we can use the same information in a later DSE
pass to eliminate some dead stores which amounts to ~25% of the
instructions of this hot memory-pipeline-bound loop.  The overall
performance improves by 18% on our ARM64.

The scoped noalias annotation is added in LoopVersioning.  The patch
then enables this for loop distribution.  A follow-on patch will enable
it for the vectorizer.  Eventually this should be run by default when
versioning the loop but first I'd like to get some feedback whether my
understanding and application of scoped noalias metadata is correct.

Essentially my approach was to have a separate alias domain for each
versioning of the loop.  For example, if we first version in loop
distribution and then in vectorization of the distributed loops, we have
a different set of memchecks for each versioning.  By keeping the scopes
in different domains they can conveniently be defined independently
since different alias domains don't affect each other.

As written, I also have a separate domain for each loop.  This is not
necessary and we could save some metadata here by using the same domain
across the different loops.  I don't think it's a big deal either way.

Probably the best is to review the tests first to see if I mapped this
problem correctly to scoped noalias markers.  I have plenty of comments
in the tests.

Note that the interface is prepared for the vectorizer which needs the
annotateInstWithNoAlias API.  The vectorizer does not use LoopVersioning
so we need a way to pass in the versioned instructions.  This is also
why the maps have to become part of the object state.

Also currently, we only have an AA-aware DSE after the vectorizer if we
also run the LTO pipeline.  Depending how widely this triggers we may
want to schedule a DSE toward the end of the regular pass pipeline.

Reviewers: hfinkel, nadav, ashutosh.nema

Subscribers: mssimpso, aemerson, llvm-commits, mcrosier

Differential Revision: http://reviews.llvm.org/D16712

llvm-svn: 263743
2016-03-17 20:32:32 +00:00
bindings bindings/go: reinstate TargetMachine.TargetData 2016-03-15 05:04:06 +00:00
cmake cmake: include what you use 2016-03-08 18:56:00 +00:00
docs Remove obselete reference to TypeResolve from the tutorial. 2016-03-17 10:20:58 +00:00
examples [PM] Update Kaleidoscope with the new header file. 2016-03-11 12:10:15 +00:00
include [LoopVersioning] Annotate versioned loop with noalias metadata 2016-03-17 20:32:32 +00:00
lib [LoopVersioning] Annotate versioned loop with noalias metadata 2016-03-17 20:32:32 +00:00
projects Remove autoconf support 2016-01-26 21:29:08 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
test [LoopVersioning] Annotate versioned loop with noalias metadata 2016-03-17 20:32:32 +00:00
tools [llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format 2016-03-17 10:43:44 +00:00
unittests [Support] Update Error unit test to remove implementation specific behaviour. 2016-03-16 01:20:54 +00:00
utils [lit] Enqueue tests on a separate thread to not hit limits on parallel queues 2016-03-17 18:27:33 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy adding readability-identifier-naming to llvm clang-tidy configuration. 2015-12-08 17:44:51 +00:00
.gitignore Minor updates to gitignore so that symlinks are ignored in the projects dir. 2015-07-07 20:24:58 +00:00
CMakeLists.txt llvm-shlib: Remove the option to override __cxa_atexit 2016-03-14 21:54:45 +00:00
CODE_OWNERS.TXT Add self to CODE_OWNERS 2016-03-08 19:01:15 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT [WebAssembly] Initial WebAssembly backend 2015-06-29 23:51:55 +00:00
LICENSE.TXT Update for a new year. 2015-03-12 01:25:29 +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 Revert previous test commit. 2016-01-04 19:13:29 +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.