summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-041-0/+1
| | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. llvm-svn: 178725
* Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-261-1/+1
| | | | | | | | | | | that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. llvm-svn: 177988
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-263-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. llvm-svn: 177971
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-284-3/+4
| | | | | | for refactoring the ARC Optimizer. llvm-svn: 173647
* Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-191-1/+1
| | | | | | includes. llvm-svn: 172891
* Added -view-callgraph module pass.Andrew Trick2013-01-111-72/+1
| | | | | | | | -dot-callgraph similarly follows a standard module pass pattern. Patch by Speziale Ettore! llvm-svn: 172220
* Fix #includes after my last commit.Jakub Staszak2013-01-101-1/+1
| | | | llvm-svn: 172114
* Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-071-1/+1
| | | | | | implementation lives already. llvm-svn: 171746
* Switch TargetTransformInfo from an immutable analysis pass that requiresChandler Carruth2013-01-071-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a TargetMachine to construct (and thus isn't always available), to an analysis group that supports layered implementations much like AliasAnalysis does. This is a pretty massive change, with a few parts that I was unable to easily separate (sorry), so I'll walk through it. The first step of this conversion was to make TargetTransformInfo an analysis group, and to sink the nonce implementations in ScalarTargetTransformInfo and VectorTargetTranformInfo into a NoTargetTransformInfo pass. This allows other passes to add a hard requirement on TTI, and assume they will always get at least on implementation. The TargetTransformInfo analysis group leverages the delegation chaining trick that AliasAnalysis uses, where the base class for the analysis group delegates to the previous analysis *pass*, allowing all but tho NoFoo analysis passes to only implement the parts of the interfaces they support. It also introduces a new trick where each pass in the group retains a pointer to the top-most pass that has been initialized. This allows passes to implement one API in terms of another API and benefit when some other pass above them in the stack has more precise results for the second API. The second step of this conversion is to create a pass that implements the TargetTransformInfo analysis using the target-independent abstractions in the code generator. This replaces the ScalarTargetTransformImpl and VectorTargetTransformImpl classes in lib/Target with a single pass in lib/CodeGen called BasicTargetTransformInfo. This class actually provides most of the TTI functionality, basing it upon the TargetLowering abstraction and other information in the target independent code generator. The third step of the conversion adds support to all TargetMachines to register custom analysis passes. This allows building those passes with access to TargetLowering or other target-specific classes, and it also allows each target to customize the set of analysis passes desired in the pass manager. The baseline LLVMTargetMachine implements this interface to add the BasicTTI pass to the pass manager, and all of the tools that want to support target-aware TTI passes call this routine on whatever target machine they end up with to add the appropriate passes. The fourth step of the conversion created target-specific TTI analysis passes for the X86 and ARM backends. These passes contain the custom logic that was previously in their extensions of the ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces. I separated them into their own file, as now all of the interface bits are private and they just expose a function to create the pass itself. Then I extended these target machines to set up a custom set of analysis passes, first adding BasicTTI as a fallback, and then adding their customized TTI implementations. The fourth step required logic that was shared between the target independent layer and the specific targets to move to a different interface, as they no longer derive from each other. As a consequence, a helper functions were added to TargetLowering representing the common logic needed both in the target implementation and the codegen implementation of the TTI pass. While technically this is the only change that could have been committed separately, it would have been a nightmare to extract. The final step of the conversion was just to delete all the old boilerplate. This got rid of the ScalarTargetTransformInfo and VectorTargetTransformInfo classes, all of the support in all of the targets for producing instances of them, and all of the support in the tools for manually constructing a pass based around them. Now that TTI is a relatively normal analysis group, two things become straightforward. First, we can sink it into lib/Analysis which is a more natural layer for it to live. Second, clients of this interface can depend on it *always* being available which will simplify their code and behavior. These (and other) simplifications will follow in subsequent commits, this one is clearly big enough. Finally, I'm very aware that much of the comments and documentation needs to be updated. As soon as I had this working, and plausibly well commented, I wanted to get it committed and in front of the build bots. I'll be doing a few passes over documentation later if it sticks. Commits to update DragonEgg and Clang will be made presently. llvm-svn: 171681
* Convert the TargetTransformInfo from an immutable pass with dynamicChandler Carruth2013-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | interfaces which could be extracted from it, and must be provided on construction, to a chained analysis group. The end goal here is that TTI works much like AA -- there is a baseline "no-op" and target independent pass which is in the group, and each target can expose a target-specific pass in the group. These passes will naturally chain allowing each target-specific pass to delegate to the generic pass as needed. In particular, this will allow a much simpler interface for passes that would like to use TTI -- they can have a hard dependency on TTI and it will just be satisfied by the stub implementation when that is all that is available. This patch is a WIP however. In particular, the "stub" pass is actually the one and only pass, and everything there is implemented by delegating to the target-provided interfaces. As a consequence the tools still have to explicitly construct the pass. Switching targets to provide custom passes and sinking the stub behavior into the NoTTI pass is the next step. llvm-svn: 171621
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-024-6/+6
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort a few more #include lines in tools/... unittests/... and utils/...Chandler Carruth2013-01-021-1/+1
| | | | llvm-svn: 171363
* Make opt grab the triple from the module and use it to initialize the target ↵Nadav Rotem2013-01-011-8/+8
| | | | | | machine. llvm-svn: 171341
* llvm/tools: Add #include "llvm/TargetTransformInfo.h"NAKAMURA Takumi2012-12-111-0/+1
| | | | llvm-svn: 169817
* Sort the #include lines for tools/...Chandler Carruth2012-12-044-26/+26
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* One more step towards making doInitialization and doFinalization useful forPedro Artigas2012-11-291-2/+0
| | | | | | | start up and clean up module passes, now that ASAN and TSAN are fixed the tests pass llvm-svn: 168905
* Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson2012-11-271-0/+2
| | | | | | | | doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model". It appears to have broken at least one buildbot. llvm-svn: 168654
* Step towards implementation of pass manager with doInitialization and ↵Owen Anderson2012-11-261-2/+0
| | | | | | | | doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model Patch by Pedro Artigas, with feedback from by Chandler Carruth. llvm-svn: 168635
* Add doInitialization and doFinalization methods to ModulePass's, to allow ↵Owen Anderson2012-11-151-0/+2
| | | | | | | | them to be re-initialized and reused on multiple Module's. Patch by Pedro Artigas. llvm-svn: 168008
* Opt does not need to initialize the Asm printer/parserNadav Rotem2012-10-241-2/+0
| | | | llvm-svn: 166602
* Opt needs to initialize the different targets.Nadav Rotem2012-10-241-0/+6
| | | | llvm-svn: 166595
* Reapply the TargerTransformInfo changes, minus the changes to LSR and ↵Nadav Rotem2012-10-184-3/+81
| | | | | | Lowerinvoke. llvm-svn: 166248
* Temporarily revert the TargetTransform changes.Bob Wilson2012-10-184-81/+3
| | | | | | | | | | | The TargetTransform changes are breaking LTO bootstraps of clang. I am working with Nadav to figure out the problem, but I am reverting it for now to get our buildbots working. This reverts svn commits: 165665 165669 165670 165786 165787 165997 and I have also reverted clang svn 165741 llvm-svn: 166168
* Add a new interface to allow IR-level passes to access codegen-specific ↵Nadav Rotem2012-10-104-3/+81
| | | | | | information. llvm-svn: 165665
* Move TargetData to DataLayout.Micah Villmow2012-10-081-6/+6
| | | | llvm-svn: 165403
* Code cleanup: tools/opt/opt.cppLogan Chien2012-09-011-4/+0
| | | | | | Remove unused local variable. llvm-svn: 163061
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-1/+1
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* Teach the 'opt' tool about '-Os' and '-Oz', corresponding to the ClangChandler Carruth2012-05-161-12/+41
| | | | | | | | | | | | | options, to enable easier testing of the innards of LLVM that are enabled by such optimization strategies. Note that this doesn't provide the (much needed) function attribute support for -Oz (as opposed to -Os), but still seems like a positive step to better test the logic that Clang currently relies on. Patch by Patrik Hägglund. llvm-svn: 156913
* allow opt to take a -mtriple optionJoe Groff2012-04-171-0/+7
| | | | llvm-svn: 154959
* Add a basic-block autovectorization pass.Hal Finkel2012-02-013-2/+3
| | | | | | | This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure. Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser). llvm-svn: 149468
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* When doing "opt -O2" verify the bitcode like is done forDuncan Sands2011-12-071-0/+2
| | | | | | "opt -std-compile-opts". llvm-svn: 146036
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-152-4/+4
| | | | llvm-svn: 144648
* LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar2011-11-111-0/+23
| | | | llvm-svn: 144417
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-181-2/+2
| | | | | | new all-targets pseudo-component. llvm-svn: 142401
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-161-1/+1
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.Bill Wendling2011-08-031-2/+0
| | | | | | This is some of my original LLVM code. *wipes tear* llvm-svn: 136821
* move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,Rafael Espindola2011-08-021-1/+1
| | | | | | | but it solves a layering violation since things in Support are not supposed to use things in Transforms. llvm-svn: 136726
* We only do always-inlining at -O1; make opt reflect that.Eli Friedman2011-06-061-1/+1
| | | | llvm-svn: 132693
* initialize and finalize function passes, pointed out by Cameron.Chris Lattner2011-05-221-1/+4
| | | | llvm-svn: 131843
* switch opt to using PassManagerBuilder.hChris Lattner2011-05-221-34/+31
| | | | llvm-svn: 131824
* remove graphprinter support for domfrontier.Chris Lattner2011-04-051-3/+1
| | | | llvm-svn: 128938
* Added *hidden* flags -print-options and -print-all-options soAndrew Trick2011-04-051-0/+3
| | | | | | | | | | | | | | | | | | | developers can see if their driver changed any cl::Option's. The current implementation isn't perfect but handles most kinds of options. This is nice to have when decomposing the stages of compilation and moving between different drivers. It's also a good sanity check when comparing results produced by different command line invocations that are expected to produce the comparable results. Note: This is not an attempt to prolong the life of cl::Option. On the contrary, it's a placeholder for a feature that must exist when cl::Option is replaced by a more appropriate framework. A new framework needs: a central option registry, dynamic name lookup, non-global containers of option values (e.g. per-module, per-function), *and* the ability to print options values and their defaults at any point during compilation. llvm-svn: 128910
* whitespaceAndrew Trick2011-04-051-8/+8
| | | | llvm-svn: 128905
* Update BreakpointPrinter to emit original function names only. Devang Patel2011-04-041-15/+31
| | | | llvm-svn: 128839
* add a way to disable all builtins, wire it up to opt's ↵Chris Lattner2011-02-181-2/+6
| | | | | | -disable-simplifylibcalls flag. llvm-svn: 125978
* Have opt set up a specific TargetLibraryInfo for modulesChris Lattner2011-02-181-2/+8
| | | | | | with a triple. llvm-svn: 125970
* Make -disable-simplify-libcalls work with -std-compile-optsPeter Collingbourne2011-02-181-1/+1
| | | | llvm-svn: 125824
* While printing "interesting" breakpoint locations for debug info quality ↵Devang Patel2011-01-311-27/+12
| | | | | | test harness, focus only on entry block's terminator for now. llvm-svn: 124610
* RegionPassPrinter should contain the name of the pass printedTobias Grosser2011-01-201-2/+2
| | | | llvm-svn: 123941
OpenPOWER on IntegriCloud