summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
...
* 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
* Give SmallPtrSet move semantics when we have R-value references.Chandler Carruth2013-11-20
| | | | | | | | | | | | Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it. The code to implement move semantics for it is pretty horrible currently but was written to reasonably closely match the rest of the code. Unittests that cover both copying and moving (at a basic level) added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195239 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to reflect the next release.Bill Wendling2013-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195235 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Make the function pass manager more regular.Chandler Carruth2013-11-20
| | | | | | | | | | | | | | | | The FunctionPassManager is now itself a function pass. When run over a function, it runs all N of its passes over that function. This is the 1:N mapping in the pass dimension only. This allows it to be used in either a ModulePassManager or potentially some other manager that works on IR units which are supersets of Functions. This commit also adds the obvious adaptor to map from a module pass to a function pass, running the function pass across every function in the module. The test has been updated to use this new pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195192 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added file checksum to gcno and gcda files.Yuchen Wu2013-11-20
| | | | | | | | | | | | Instead of permanently outputting "MVLL" as the file checksum, clang will create gcno and gcda checksums by hashing the destination block numbers of every arc. This allows for llvm-cov to check if the two gcov files are synchronized. Regenerated the test files so they contain the checksum. Also added negative test to ensure error when the checksums don't match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195191 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Split the analysis manager into a function-specific interface andChandler Carruth2013-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a module-specific interface. This is the first of many steps necessary to generalize the infrastructure such that we can support both a Module-to-Function and Module-to-SCC-to-Function pass manager nestings. After a *lot* of attempts that never worked and didn't even make it to a committable state, it became clear that I had gotten the layering design of analyses flat out wrong. Four days later, I think I have most of the plan for how to correct this, and I'm starting to reshape the code into it. This is just a baby step I'm afraid, but starts separating the fundamentally distinct concepts of function analysis passes and module analysis passes so that in subsequent steps we can effectively layer them, and have a consistent design for the eventual SCC layer. As part of this, I've started some interface changes to make passes more regular. The module pass accepts the module in the run method, and some of the constructor parameters are gone. I'm still working out exactly where constructor parameters vs. method parameters will be used, so I expect this to fluctuate a bit. This actually makes the invalidation less "correct" at this phase, because now function passes don't invalidate module analysis passes, but that was actually somewhat of a misfeature. It will return in a better factored form which can scale to other units of IR. The documentation has gotten less verbose and helpful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195189 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove capability for polymorphic destruction from LexicalScopeEric Christopher2013-11-20
| | | | | | and LexicalScopes, we're not using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195182 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting, 80-col, trailing whitespace.Eric Christopher2013-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195180 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the fence instruction via the C API.Filip Pizlo2013-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195173 91177308-0d34-0410-b5e6-96231b3b80d8
* [DAG] Refactor vector splitting code in SelectionDAG. No functional change ↵Juergen Ributzka2013-11-19
| | | | | | | | intended. Reviewed by Tom git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195156 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added constness property to methods.Yuchen Wu2013-11-19
| | | | | | | Added constness to methods that shouldn't modify objects. Replaced operator[] lookup in maps with find() instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195151 91177308-0d34-0410-b5e6-96231b3b80d8
* Support multiple COFF sections with the same name but different COMDAT.Rafael Espindola2013-11-19
| | | | | | | | | | | | | | | | | | This is the first step to fix pr17918. It extends the .section directive a bit, inspired by what the ELF one looks like. The problem with using linkonce is that given .section foo .linkonce.... .section foo .linkonce we would already have switched sections when getting to .linkonce. The cleanest solution seems to be to add the comdat information in the .section itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195148 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML I/O - Added default trait support for std:string. Making another ↵John Thompson2013-11-19
| | | | | | attempt at this, this time doing a clean build on Linux, and running the LLVM, clang, and extra tests, to try to make sure there's no problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195134 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for software expansion of 64-bit integer division instructions.Michael Ilseman2013-11-19
| | | | | | | | Patch by Dmitri Shtilman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195116 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix patchpoint comments.Andrew Trick2013-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195103 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an abstraction to handle patchpoint operands.Andrew Trick2013-11-19
| | | | | | | Hard-coded operand indices were scattered throughout lowering stages and layers. It was super bug prone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195093 91177308-0d34-0410-b5e6-96231b3b80d8
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-19
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Simplify a few more explicit constructions, underconstrained ↵David Blaikie2013-11-18
| | | | | | types, and make DIType(MDNode*) explicit like all the other DI* node ctors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195055 91177308-0d34-0410-b5e6-96231b3b80d8
* Recover gracefully when deserializing invalid YAML input.Alexander Kornienko2013-11-18
| | | | | | | | | | Fixes http://llvm.org/PR16221, http://llvm.org/PR15927 Phabricator: http://llvm-reviews.chandlerc.com/D1236 Patch by Andrew Tulloch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195016 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix forgotten member initialization detected by MSan bootstrap botAlexey Samsonov2013-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195003 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r194865 and r194874.Alexey Samsonov2013-11-18
| | | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the newly added ACLE functions for ld1/st1 with 2/3/4 vectors.Hao Liu2013-11-18
| | | | | | | The functions are like: vst1_s8_x2 ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194990 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spacing, forward declare order.Matt Arsenault2013-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194985 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: fix typo in function name.Manman Ren2013-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194975 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Verifier: enable public functions of Finder to update the type map.Manman Ren2013-11-17
| | | | | | | | | | | We used to depend on running processModule before the other public functions such as processDeclare, processValue and processLocation. We are now relaxing the constraint by adding a module argument to the three functions and letting the three functions to initialize the type map. This will be used in a follow-on patch that collects nodes reachable from a Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194973 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a loop rerolling flag to the PassManagerBuilderHal Finkel2013-11-17
| | | | | | | | | This adds a boolean member variable to the PassManagerBuilder to control loop rerolling (just like we have for unrolling and the various vectorization options). This is necessary for control by the frontend. Loop rerolling remains disabled by default at all optimization levels. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194966 91177308-0d34-0410-b5e6-96231b3b80d8