summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Reland 196270 "Generalize debug info / EH emission in AsmPrinter"Timur Iskhodzhanov2013-12-03
| | | | | | Addressing the existense AMDGPUAsmPrinter and other subclasses of AsmPrinter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196288 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r196270, "Generalize debug info / EH emission in AsmPrinter"NAKAMURA Takumi2013-12-03
| | | | | | It broke CodeGen/R600 tests with +Asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196272 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize debug info / EH emission in AsmPrinterTimur Iskhodzhanov2013-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196270 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Removed output to STDOUT/specified file.Yuchen Wu2013-12-03
| | | | | | | | | | | | Instead of asking the user to specify a single file to output coverage info and defaulting to STDOUT, llvm-cov now creates files for each source file with a naming system of: <source filename> + ".llcov". This is what gcov does and although it can clutter the working directory with numerous coverage files, it will be easier to hook the llvm-cov output to tools which operate on this assumption (such as lcov). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196184 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MachineBlockFrequencyInfo::view for displaying the block frequency ↵Michael Gottesman2013-12-03
| | | | | | | | | | | | propagation graph via graphviz. This is useful for debugging issues in the BlockFrequency implementation since one can easily visualize where probability mass and other errors occur in the propagation. This is the MI version of r194654. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196183 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Store blocks rather than counts per line.Yuchen Wu2013-12-03
| | | | | | | | | Each line stores all the blocks that execute on that line, instead of only storing the line counts previously accumulated. This provides more information for each line, and will be useful for options in enabling block and branch information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196177 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added edge struct for traversal in block.Yuchen Wu2013-12-03
| | | | | | | | | | | | | Added GCOVEdge which are simple structs owned by the GCOVFunction that stores the source and destination GCOVBlocks, as well as the counts. Changed GCOVBlocks so that it stores a vector of source GCOVEdges and a vector of destination GCOVEdges, rather than just the block number. Storing the block number was only useful for knowing the number of edges and for debug info. Using a struct is useful for traversing the edges, especially back edges which may be needed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196175 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Split up reading of GCNO and GCDA files.Yuchen Wu2013-12-03
| | | | | | There are now two functions: readGCNO() and readGCDA(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196173 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: rename getDebugInfoVersionFromModule to ↵Manman Ren2013-12-03
| | | | | | | | | getDebugMetadataVersionFromModule. Suggested by Eric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196172 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the setting of PrivateGlobalPrefix.Rafael Espindola2013-12-02
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196170 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert two char* that are only ever used as booleans to bool.Rafael Espindola2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196168 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: drop debug info via upgrading path if version number does not match.Manman Ren2013-12-02
| | | | | | | | | | | | | | | Add a helper function getDebugInfoVersionFromModule to return the debug info version number for a module. "Verifier/module-flags-1.ll" checks for verification errors. It will seg fault when calling getDebugInfoVersionFromModule because of the incorrect format for module flags in the testing case. We make getModuleFlagsMetadata more robust by checking for error conditions. PR17982 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196158 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Move the constant for Debug Info Version from Dwarf.h to Metadata.h.Manman Ren2013-12-02
| | | | | | | Suggested by Eric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196144 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.Rafael Espindola2013-12-02
| | | | | | This allows it to be used in TargetLoweringObjectFileImpl.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dominator descendants for unreachable blocks.Diego Novillo2013-12-02
| | | | | | | | | | | | | When a block is unreachable, asking its dom tree descendants should return the empty set. However, the computation of the descendants was causing a segmentation fault because the dom tree node we get from the basic block is initially NULL. Fixed by adding a test for a valid dom tree node before we iterate. The patch also adds some unit tests to the existing dom tree tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196099 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] [cleanup] Rearrange the public and private sections of this classChandler Carruth2013-12-02
| | | | | | | | | | | | to be a bit more sensible. The public interface now is first followed by the implementation details. This also resolves a FIXME to make something private -- it was already possible as the one special caller was already a friend. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196095 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Rafael Espindola2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196066 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the default of AsmWriterClassName and isMCAsmWriter.Rafael Espindola2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196065 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor a lot of patchpoint/stackmap related code to simplify and make itLang Hames2013-11-29
| | | | | | | | | | | | | | | | | | | | | | | | target independent. Most of the x86 specific stackmap/patchpoint handling was necessitated by the use of the native address-mode format for frame index operands. PEI has now been modified to treat stackmap/patchpoint similarly to DEBUG_INFO, allowing us to use a simple, platform independent register/offset pair for frame indexes on stackmap/patchpoints. Notes: - Folding is now platform independent and automatically supported. - Emiting patchpoints with direct memory references now just involves calling the TargetLoweringBase::emitPatchPoint utility method from the target's XXXTargetLowering::EmitInstrWithCustomInserter method. (See X86TargetLowering for an example). - No more ugly platform-specific operand parsers. This patch shouldn't change the generated output for X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195944 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an always true parameter.Rafael Espindola2013-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195931 91177308-0d34-0410-b5e6-96231b3b80d8
* The global prefix is always one char. Don't use a string for it.Rafael Espindola2013-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195926 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead argument.Rafael Espindola2013-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195806 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add support for NEON scalar floating-point absolute difference.Chad Rosier2013-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195803 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Remove the underspecified 'getRoot' method from CallGraph. It'sChandler Carruth2013-11-27
| | | | | | | | only user was an ancient SCC printing bit of the opt tool which really should be walking the call graph the same way the CGSCC pass manager does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195800 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] [cleanup] Replace a reserved identifier "_Self" with the injectedChandler Carruth2013-11-26
| | | | | | | | class name. I think we're no longer using any compilers with sufficiently broken ICN for this use case, but I'll watch the bots and introduce a typedef without a reserved name if any yell at me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195793 91177308-0d34-0410-b5e6-96231b3b80d8
* [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