summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
...
* [AArch64] Add support for NEON scalar floating-point to integer convertChad Rosier2013-11-26
| | | | | | instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195788 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] [cleanup] Run clang-format over this file. If fixes manyChandler Carruth2013-11-26
| | | | | | inconsistencies that I'll just need to fix myself as I edit things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195784 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] [cleanup] Update doxygen comments to use the new style, add someChandler Carruth2013-11-26
| | | | | | | | | | doxygen comments, make existing comments doxygen comments etc. Also, switch commented-out debug helpers to #if-0-ed out debug helpers. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195783 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PostDominatorTree::getDescendants.Diego Novillo2013-11-26
| | | | | | | | This patch adds the counter-part to DominatorTree::getDescendants. It also fixes a couple of comments I noticed out of date in the DominatorTree class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195778 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Fix a stale comment after my last refactoring spoted by Joey inChandler Carruth2013-11-26
| | | | | | review! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195757 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Remove four extraneous 'typename's that Clang (in C++11 mode) isChandler Carruth2013-11-26
| | | | | | | | happy with but GCC complains about. I'm assuming both compilers are correct and these are optional in C++11 because I'm too tired to read the standard. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195748 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Factor the overwhelming majority of the interface boiler plate outChandler Carruth2013-11-26
| | | | | | | | | | | | | | of the two analysis managers into a CRTP base class that can be shared and re-used in building any analysis manager. This will in turn simplify adding yet another analysis manager to the system. The base class provides all of the interface sugar for the analysis manager delegating the functionality back through DerivedT methods which operate on simple pass IDs. It also provides the pass registration, storage, and lookup system which is common across the various formulations of analysis managers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195747 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Split the CallGraph out from the ModulePass which creates theChandler Carruth2013-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CallGraph. This makes the CallGraph a totally generic analysis object that is the container for the graph data structure and the primary interface for querying and manipulating it. The pass logic is separated into its own class. For compatibility reasons, the pass provides wrapper methods for most of the methods on CallGraph -- they all just forward. This will allow the new pass manager infrastructure to provide its own analysis pass that constructs the same CallGraph object and makes it available. The idea is that in the new pass manager, the analysis pass's 'run' method returns a concrete analysis 'result'. Here, that result is a 'CallGraph'. The 'run' method will typically do only minimal work, deferring much of the work into the implementation of the result object in order to be lazy about computing things, but when (like DomTree) there is *some* up-front computation, the analysis does it prior to handing the result back to the querying pass. I know some of this is fairly ugly. I'm happy to change it around if folks can suggest a cleaner interim state, but there is going to be some amount of unavoidable ugliness during the transition period. The good thing is that this is very limited and will naturally go away when the old pass infrastructure goes away. It won't hang around to bother us later. Next up is the initial new-PM-style call graph analysis. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195722 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add a really simple trait to the DOTGraphTraitsPass class templatesChandler Carruth2013-11-26
| | | | | | | | | | that lets the analysis and graph types be separate and the graph computed from the analysis through some arbitrary user-supplied code. This will allow a call graph to an independent entity from the pass which creates it which is necessary for the new pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195717 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Re-format this code with clang-format before making substantialChandler Carruth2013-11-26
| | | | | | | | | | | | | | | changes to it. No functionality changed. You may wonder why on earth touching this code is involved in the pass manager work as indicated by my lovely '[PM]' tag? Let me tell you a story. <redacted> Yea, it's too long of a story. Let us say that there are yaks, many of them. I am busy shaving them as fast as I can. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195715 91177308-0d34-0410-b5e6-96231b3b80d8
* StackMap: Implement support for DirectMemRefOp.Andrew Trick2013-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A Direct stack map location records the address of frame index. This address is itself the value that the runtime requested. This differs from IndirectMemRefOp locations, which refer to a stack locations from which the requested values must be loaded. Direct locations can directly communicate the address if an alloca, while IndirectMemRefOp handle register spills. For example: entry: %a = alloca i64... llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a) Since both the alloca and stackmap intrinsic are in the entry block, and the intrinsic takes the address of the alloca, the runtime can assume that LLVM will not substitute alloca with any intervening value. This must be verified by the runtime by checking that the stack map's location is a Direct location type. The runtime can then determine the alloca's relative location on the stack immediately after compilation, or at any time thereafter. This differs from Register and Indirect locations, because the runtime can only read the values in those locations when execution reaches the instruction address of the stack map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195712 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Make the (really awesome) file comment here available as part ofChandler Carruth2013-11-26
| | | | | | the Doxygen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195709 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Reformat this file with clang-format. Mostly fixes inconsistentChandler Carruth2013-11-26
| | | | | | | | spacing around the '*' in pointer types. Will let me use clang-format on subsequent changes without introducing any noise. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195708 91177308-0d34-0410-b5e6-96231b3b80d8
* Lift self-copy protection up to the header file and add self-moveChandler Carruth2013-11-26
| | | | | | | | | | | | protection to the same layer. This is in line with Howard's advice on how best to handle self-move assignment as he explained on SO[1]. It also ensures that implementing swap with move assignment continues to work in the case of self-swap. [1]: http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195705 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Sink a trailing comment to be a doxygen comment.Chandler Carruth2013-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195702 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionalityChandler Carruth2013-11-26
| | | | | | changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195701 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Clean up a bunch of comments, modernize the doxygen, nuke someChandler Carruth2013-11-26
| | | | | | | whitespace, and a couple of argument name fixes before I start hacking on this code. No functionality changed here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195699 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an intrinsic for the SSE2 PAUSE instruction.Cameron McInally2013-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195697 91177308-0d34-0410-b5e6-96231b3b80d8
* Put an unused result attribute on SmallSet::empty()Alp Toker2013-11-23
| | | | | | | | This matches other empty() container functions in LLVM. No actual usage problems discovered in this instance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195562 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Complete the cross-layer interfaces with a Module-to-FunctionChandler Carruth2013-11-23
| | | | | | | | | | | | | proxy. This lets a function pass query a module analysis manager. However, the interface is const to indicate that only cached results can be safely queried. With this, I think the new pass manager is largely functionally complete for modules and analyses. Still lots to test, and need to generalize to SCCs and Loops, and need to build an adaptor layer to support the use of existing Pass objects in the new managers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195538 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add support to the analysis managers to query explicitly for cachedChandler Carruth2013-11-23
| | | | | | | | | | | results. This is the last piece of infrastructure needed to effectively support querying *up* the analysis layers. The next step will be to introduce a proxy which provides access to those layers with appropriate use of const to direct queries to the safe interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195525 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Switch the downward invalidation to be incremental where only theChandler Carruth2013-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one function's analyses are invalidated at a time. Also switch the preservation of the proxy to *fully* preserve the lower (function) analyses. Combined, this gets both upward and downward analysis invalidation to a point I'm happy with: - A function pass invalidates its function analyses, and its parent's module analyses. - A module pass invalidates all of its functions' analyses including the set of which functions are in the module. - A function pass can preserve a module analysis pass. - If all function passes preserve a module analysis pass, that preservation persists. If any doesn't the module analysis is invalidated. - A module pass can opt into managing *all* function analysis invalidation itself or *none*. - The conservative default is none, and the proxy takes the maximally conservative approach that works even if the set of functions has changed. - If a module pass opts into managing function analysis invalidation it has to propagate the invalidation itself, the proxy just does nothing. The only thing really missing is a way to query for a cached analysis or nothing at all. With this, function passes can more safely request a cached module analysis pass without fear of it accidentally running part way through. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195519 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Remove a FIXME comment that was fixed by my recent refactorings:Chandler Carruth2013-11-22
| | | | | | | now the access to the manager is via the proxy that ensures it behaves correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195518 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.Manman Ren2013-11-22
| | | | | | | | | | | We can share the implementation between StripSymbols and dropping debug info for metadata versions that do not match. Also update the comments to match the implementation. A follow-on patch will drop the "Debug Info Version" module flag in StripDebugInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195505 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: add a constant for debug info version number.Manman Ren2013-11-22
| | | | | | | This will be used to output the debug info version number as a module flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195494 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ISel not to optimize 'optnone' functions (revised).Paul Robinson2013-11-22
| | | | | | | | | | | | | | Improvements over r195317: - Set/restore EnableFastISel flag instead of just running FastISel within SelectAllBasicBlocks; the flag is checked in various places, and FastISel won't run properly if those places don't do the right thing. - Test looks for normal ISel versus FastISel behavior, and not something more subtle that doesn't work everywhere. Based on work by Andrea Di Biagio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195491 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Scalarizer pass.Richard Sandiford2013-11-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195471 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Remove extraneous space that I left in there.Chandler Carruth2013-11-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195453 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Teach the analysis managers to pass themselves as arguments to theChandler Carruth2013-11-22
| | | | | | | | | | | | | | run methods of the analysis passes. Also generalizes and re-uses the SFINAE for transformation passes so that users can write an analysis pass and only accept an analysis manager if that is useful to their pass. This completes the plumbing to make an analysis manager available through every pass's run method if desired so that passes no longer need to be constructed around them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195451 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' inChandler Carruth2013-11-22
| | | | | | | | several templates. The previous order didn't make any sense as it separated 'IRUnitT' and 'AnalysisManagerT', the types which are essentially paired and passed along together throughout the layers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195450 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Remove the IRUnitT typedef requirement for analysis passes.Chandler Carruth2013-11-22
| | | | | | | | | | | | Since the analysis managers were split into explicit function and module analysis managers, it is now completely trivial to specify this when building up the concept and model types explicitly, and it is impossible to end up with a type error at run time. We instantiate a template when registering a pass that will enforce the requirement at a type-system level, and we produce a dynamic error on all the other query paths to the analysis manager if the pass in question isn't registered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195447 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Fix the analysis templates' usage of IRUnitT.Chandler Carruth2013-11-22
| | | | | | | | | | | This is supposed to be the whole type of the IR unit, and so we shouldn't pass a pointer to it but rather the value itself. In turn, we need to provide a 'Module *' as that type argument (for example). This will become more relevant with SCCs or other units which may not be passed as a pointer type, but also brings consistency with the transformation pass templates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195445 91177308-0d34-0410-b5e6-96231b3b80d8
* [block-freq] Add a method to loop info for returning all loop latches for a ↵Michael Gottesman2013-11-22
| | | | | | | | | | specific loop. We already have a method for returning one loop latch but for some reason no one has committed one for returning loop latches in the case where there are multiple latches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195410 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Simplify how the SFINAE for AnalysisResultModel is applied byChandler Carruth2013-11-22
| | | | | | | factoring it out into the default template argument so clients don't have to even think about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195402 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo where we were creating <def,kill> operands instead ofLang Hames2013-11-22
| | | | | | | | | | | | <def,dead> ones. Add an assertion to make sure we catch this in the future. Fixes <rdar://problem/15464559>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195401 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Switch analysis managers to be threaded through the run methodsChandler Carruth2013-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than the constructors of passes. This simplifies the APIs of passes significantly and removes an error prone pattern where the *same* manager had to be given to every different layer. With the new API the analysis managers themselves will have to be cross connected with proxy analyses that allow a pass at one layer to query for the analysis manager of another layer. The proxy will both expose a handle to the other layer's manager and it will provide the invalidation hooks to ensure things remain consistent across layers. Finally, the outer-most analysis manager has to be passed to the run method of the outer-most pass manager. The rest of the propagation is automatic. I've used SFINAE again to allow passes to completely disregard the analysis manager if they don't need or want to care. This helps keep simple things simple for users of the new pass manager. Also, the system specifically supports passing a null pointer into the outer-most run method if your pass pipeline neither needs nor wants to deal with analyses. I find this of dubious utility as while some *passes* don't care about analysis, I'm not sure there are any real-world users of the pass manager itself that need to avoid even creating an analysis manager. But it is easy to support, so there we go. Finally I renamed the module proxy for the function analysis manager to the more verbose but less confusing name of FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea what else to name these things. I'm expecting in the fullness of time to potentially have the complete cross product of types at the proxy layer: {Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy (except for XAnalysisManagerXProxy which doesn't make any sense) This should make it somewhat easier to do the next phases which is to build the upward proxy and get its invalidation correct, as well as to make the invalidation within the Module -> Function mapping pass be more fine grained so as to invalidate fewer fuction analyses. After all of the proxy analyses are done and the invalidation working, I'll finally be able to start working on the next two fun fronts: how to adapt an existing pass to work in both the legacy pass world and the new one, and building the SCC, Loop, and Region counterparts. Fun times! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195400 91177308-0d34-0410-b5e6-96231b3b80d8
* Split SETCC if VSELECT requires splitting too.Tom Stellard2013-11-22
| | | | | | | | | | | | | | This patch is a rewrite of the original patch commited in r194542. Instead of relying on the type legalizer to do the splitting for us, we now peform the splitting ourselves in the DAG combiner. This is necessary for the case where the vector mask is a legal type after promotion and still wouldn't require splitting. Patch by: Juergen Ributzka NOTE: This is a candidate for the 3.4 branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195397 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2013-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195341 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Fix typo and trailing space.Chandler Carruth2013-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195340 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."NAKAMURA Takumi2013-11-21
| | | | | | | | It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown". FYI, it didn't appear to add either "-O0" or "-fast-isel". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195339 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Widen the interface for invalidate on an analysis result now thatChandler Carruth2013-11-21
| | | | | | | | | | | | | | | | | | | it is completely optional, and sink the logic for handling the preserved analysis set into it. This allows us to implement the delegation logic desired in the proxy module analysis for the function analysis manager where if the proxy itself is preserved we assume the set of functions hasn't changed and we do a fine grained invalidation by walking the functions in the module and running the invalidate for them all at the manager level and letting it try to invalidate any passes. This in turn makes it blindingly obvious why we should hoist the invalidate trait and have two collections of results. That allows handling invalidation for almost all analyses without indirect calls and it allows short circuiting when the preserved set is all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195338 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add support for using SFINAE to reflect on an analysis's resultChandler Carruth2013-11-21
| | | | | | | | | | | | | | | | | | type and detect whether or not it provides an 'invalidate' member the analysis manager should use. This lets the overwhelming common case of *not* caring about custom behavior when an analysis is invalidated be the the obvious default behavior with no code written by the author of an analysis. Only when they write code specifically to handle invalidation does it get used. Both cases are actually covered by tests here. The test analysis uses the default behavior, and the proxy module analysis actually has custom behavior on invalidation that is firing correctly. (In fact, this is the analysis which was the primary motivation for having custom invalidation behavior in the first place.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195332 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented Neon scalar by element intrinsics.Ana Pazos2013-11-21
| | | | | | | | | Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane, vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195327 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ISel not to optimize 'optnone' functions.Paul Robinson2013-11-21
| | | | | | | Based on work by Andrea Di Biagio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195317 91177308-0d34-0410-b5e6-96231b3b80d8
* Dereference the node iterator when dumping the PBQP graph structure in DOTLang Hames2013-11-21
| | | | | | | | | | format. Thanks to Arnaud A. de Grandmaison for the patch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195316 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add a module analysis pass proxy for the function analysis manager.Chandler Carruth2013-11-21
| | | | | | | | | | | | | | | | This proxy will fill the role of proxying invalidation events down IR unit layers so that when a module changes we correctly invalidate function analyses. Currently this is a very coarse solution -- any change blows away the entire thing -- but the next step is to make invalidation handling more nuanced so that we can propagate specific amounts of invalidation from one layer to the next. The test is extended to place a module pass between two function pass managers each of which have preserved function analyses which get correctly invalidated by the module pass that might have changed what functions are even in the module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195304 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML I/O add support for validate()Nick Kledzik2013-11-21
| | | | | | | | | MappingTrait template specializations can now have a validate() method which performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195286 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r194655Nick Kledzik2013-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195285 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the moved-from SmallPtrSet be a valid, empty, small-state object.Chandler Carruth2013-11-20
| | | | | | | | | | | Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the tests to cover copy-assignment into a moved-from object and moving a large-state object. (Note that we can't really test small-state vs. large-state as that isn't an observable property of the API really.) This should finish addressing review on r195239. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195261 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add the preservation system to the new pass manager.Chandler Carruth2013-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new set-like type which represents a set of preserved analysis passes. The set is managed via the opaque PassT::ID() void*s. The expected convenience templates for interacting with specific passes are provided. It also supports a symbolic "all" state which is represented by an invalid pointer in the set. This state is nicely saturating as it comes up often. Finally, it supports intersection which is used when finding the set of preserved passes after N different transforms. The pass API is then changed to return the preserved set rather than a bool. This is much more self-documenting than the previous system. Returning "none" is a conservatively correct solution just like returning "true" from todays passes and not marking any passes as preserved. Passes can also be dynamically preserved or not throughout the run of the pass, and whatever gets returned is the binding state. Finally, preserving "all" the passes is allowed for no-op transforms that simply can't harm such things. Finally, the analysis managers are changed to instead of blindly invalidating all of the analyses, invalidate those which were not preserved. This should rig up all of the basic preservation functionality. This also correctly combines the preservation moving up from one IR-layer to the another and the preservation aggregation across N pass runs. Still to go is incrementally correct invalidation and preservation across IR layers incrementally during N pass runs. That will wait until we have a device for even exposing analyses across IR layers. While the core of this change is obvious, I'm not happy with the current testing, so will improve it to cover at least some of the invalidation that I can test easily in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195241 91177308-0d34-0410-b5e6-96231b3b80d8