1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Go to file
Chandler Carruth c5861be643 [PM] Add (very skeletal) support to opt for running the new pass
manager. I cannot emphasize enough that this is a WIP. =] I expect it
to change a great deal as things stabilize, but I think its really
important to get *some* functionality here so that the infrastructure
can be tested more traditionally from the commandline.

The current design is looking something like this:

  ./bin/opt -passes='module(pass_a,pass_b,function(pass_c,pass_d))'

So rather than custom-parsed flags, there is a single flag with a string
argument that is parsed into the pass pipeline structure. This makes it
really easy to have nice structural properties that are very explicit.
There is one obvious and important shortcut. You can start off the
pipeline with a pass, and the minimal context of pass managers will be
built around the entire specified pipeline. This makes the common case
for tests super easy:

  ./bin/opt -passes=instcombine,sroa,gvn

But this won't introduce any of the complexity of the fully inferred old
system -- we only ever do this for the *entire* argument, and we only
look at the first pass. If the other passes don't fit in the pass
manager selected it is a hard error.

The other interesting aspect here is that I'm not relying on any
registration facilities. Such facilities may be unavoidable for
supporting plugins, but I have alternative ideas for plugins that I'd
like to try first. My plan is essentially to build everything without
registration until we hit an absolute requirement.

Instead of registration of pass names, there will be a library dedicated
to parsing pass names and the pass pipeline strings described above.
Currently, this is directly embedded into opt for simplicity as it is
very early, but I plan to eventually pull this into a library that opt,
bugpoint, and even Clang can depend on. It should end up as a good home
for things like the existing PassManagerBuilder as well.

There are a bunch of FIXMEs in the code for the parts of this that are
just stubbed out to make the patch more incremental. A quick list of
what's coming up directly after this:
- Support for function passes and building the structured nesting.
- Support for printing the pass structure, and FileCheck tests of all of
  this code.
- The .def-file based pass name parsing.
- IR priting passes and the corresponding tests.

Some obvious things that I'm not going to do right now, but am
definitely planning on as the pass manager work gets a bit further:
- Pull the parsing into library, including the builders.
- Thread the rest of the target stuff into the new pass manager.
- Wire support for the new pass manager up to llc.
- Plugin support.

Some things that I'd like to have, but are significantly lower on my
priority list. I'll get to these eventually, but they may also be places
where others want to contribute:
- Adding nice error reporting for broken pass pipeline descriptions.
- Typo-correction for pass names.

llvm-svn: 198998
2014-01-11 08:16:35 +00:00
autoconf Remove the test for endianness in configure.ac and regenerate. 2014-01-09 01:09:57 +00:00
bindings Makefile.ocaml: Tweak to use --system-libs. 2013-12-20 00:36:59 +00:00
cmake CMake: Provide LLVM_PLUGIN_EXT definition 2014-01-08 11:10:24 +00:00
docs [anyregcc] Fix callee-save mask for anyregcc 2014-01-11 01:00:27 +00:00
examples [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
include Fix odd whitespace. 2014-01-11 00:23:11 +00:00
lib [anyregcc] Fix callee-save mask for anyregcc 2014-01-11 01:00:27 +00:00
projects Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
test [PM] Add (very skeletal) support to opt for running the new pass 2014-01-11 08:16:35 +00:00
tools [PM] Add (very skeletal) support to opt for running the new pass 2014-01-11 08:16:35 +00:00
unittests Remove remove_all. A compiler has no need for recursively deleting a directory. 2014-01-10 20:36:42 +00:00
utils Constant propagate MachineInstrClassName. 2014-01-10 22:59:49 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Introduce a cmake LLVM_ENABLE_LIBCXX build parameter to compile using libc++ instead of the system default 2014-01-06 18:27:27 +00:00
CODE_OWNERS.TXT Update email address. 2013-12-04 09:42:49 +00:00
configure Remove the test for endianness in configure.ac and regenerate. 2014-01-09 01:09:57 +00:00
CREDITS.TXT Fix documentation typos 2013-12-20 00:33:39 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile llvm-config: Fixup r197380, tweak for cross compilation. SYSTEM_LIBS should be --host's in BuildTools/llvm-config. 2013-12-16 13:09:06 +00:00
Makefile.common
Makefile.config.in
Makefile.rules [Mips]Work around MIPS linker issues exposed by commit r198087 until bug 18360 is resolved 2014-01-03 22:18:43 +00:00
README.txt Revert "Test commit to check e-mail address. Please discard this." 2013-10-04 10:59:13 +00:00

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

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, 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're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.