1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/tools
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
..
bugpoint Put the functionality for printing a value to a raw_ostream as an 2014-01-09 02:29:41 +00:00
bugpoint-passes Set LLVM_EXPORTED_SYMBOL_FILE in CMakeLists whose corresponding Makefiles do so. 2013-12-29 23:06:49 +00:00
gold Space formatting fix for r198966. 2014-01-10 23:17:39 +00:00
llc Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
lli lli: Tweak CacheName not to contain DOS driveletter. 2014-01-10 10:38:40 +00:00
llvm-ar [CMake] Introduce LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR to reduce references to CMAKE_CFG_INTDIR. 2013-12-16 16:03:08 +00:00
llvm-as Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
llvm-bcanalyzer [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-c-test Use -std=gnu99 in tools/llvm-c-test/CMakeLists.txt 2014-01-08 11:48:19 +00:00
llvm-config llvm-config: Fix typo in help message introduced with r197664. 2013-12-25 02:24:32 +00:00
llvm-cov llvm-cov: Added -f option for function summaries. 2013-12-19 00:29:25 +00:00
llvm-diff [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-dis Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
llvm-dwarfdump llvm-dwarfdump: type unit dwo support 2014-01-09 05:08:24 +00:00
llvm-extract Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
llvm-jitlistener Manually update the dependencies in the Makefiles. It turns out that all 2013-03-26 03:45:47 +00:00
llvm-link [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-lto [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-mc [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-mcmarkup MC: Simple example parser for MC assembly markup. 2012-10-31 23:24:13 +00:00
llvm-nm [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-objdump [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-readobj llvm-readobj: address review comments for ARM EHABI printing 2014-01-09 04:31:18 +00:00
llvm-rtdyld [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-shlib Strip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x). 2013-12-27 22:38:59 +00:00
llvm-size [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-stress Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
llvm-symbolizer llvm-symbolizer: add --obj flag to specify a single object file that should be symbolized. 2013-12-24 19:33:22 +00:00
lto EXPORTED_SYMBOL_FILE support for cmake 2013-12-28 23:31:44 +00:00
macho-dump [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
msbuild VS integration: use the correct registry key after r195379 2013-11-22 18:25:43 +00:00
obj2yaml [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
opt [PM] Add (very skeletal) support to opt for running the new pass 2014-01-11 08:16:35 +00:00
yaml2obj [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
CMakeLists.txt llvm/tools/llvm-c-test should be built also on msvc. 2013-10-23 17:56:59 +00:00
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile Add llvm-c-test tool for testing llvm-c 2013-10-23 08:10:20 +00:00