summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-bcanalyzer
Commit message (Collapse)AuthorAgeFilesLines
* [opaque pointer type] Bitcode support for explicit type parameter on GEP.David Blaikie2015-02-251-2/+6
| | | | | | | | | | | | | | | | | | | Like r230414, add bitcode support including backwards compatibility, for an explicit type parameter to GEP. At the suggestion of Duncan I tried coalescing the two older bitcodes into a single new bitcode, though I did hit a wrinkle: I couldn't figure out how to create an explicit abbreviation for a record with a variable number of arguments (the indicies to the gep). This means the discriminator between inbounds and non-inbounds gep is a full variable-length field I believe? Is my understanding correct? Is there a way to create such an abbreviation? Should I just use two bitcodes as before? Reviewers: dexonsmith Differential Revision: http://reviews.llvm.org/D7736 llvm-svn: 230415
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Revert "Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLD"Duncan P. N. Exon Smith2015-01-091-1/+1
| | | | | | | | | | | | | | | This reverts commit r225498 (but leaves r225499, which was a worthy cleanup). My plan was to change `DEBUG_LOC` to store the `MDNode` directly rather than its operands (patch was to go out this morning), but on reflection it's not clear that it's strictly better. (I had missed that the current code is unlikely to emit the `MDNode` at all.) Conflicts: lib/Bitcode/Reader/BitcodeReader.cpp (due to r225499) llvm-svn: 225531
* Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLDDuncan P. N. Exon Smith2015-01-091-1/+1
| | | | | | Prepare to simplify the `DebugLoc` record. llvm-svn: 225498
* Bitcode: Add METADATA_NODE and METADATA_VALUEDuncan P. N. Exon Smith2014-12-111-0/+2
| | | | | | | | | | | | | | | | This reflects the typelessness of `Metadata` in the bitcode format, removing types from all metadata operands. `METADATA_VALUE` represents a `ValueAsMetadata`, and always has two fields: the type and the value. `METADATA_NODE` represents an `MDNode`, and unlike `METADATA_OLD_NODE`, doesn't store types. It stores operands at their ID+1 so that `0` can reference `nullptr` operands. Part of PR21532. llvm-svn: 224073
* Bitcode: Add `OLD_` prefix to metadata node recordsDuncan P. N. Exon Smith2014-12-111-2/+2
| | | | | | | | I'm about to change these, so move the old ones out of the way. Part of PR21532. llvm-svn: 224070
* Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream.Jordan Rose2014-08-301-28/+79
| | | | | | | | | | | This allows streams that only use BLOCKINFO for debugging purposes to omit the block entirely. As long as another stream is available with the correct BLOCKINFO, the first stream can still be analyzed and dumped. As part of this commit, BitstreamReader gets a move constructor and move assignment operator, as well as a takeBlockInfo method. llvm-svn: 216826
* Remove some calls to std::move.Rafael Espindola2014-08-011-4/+4
| | | | | | | | | Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. llvm-svn: 214516
* Bitcode: Serialize (and recover) use-list orderDuncan P. N. Exon Smith2014-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Predict and serialize use-list order in bitcode. This makes the option `-preserve-bc-use-list-order` work *most* of the time, but this is still experimental. - Builds a full value-table up front in the writer, sets up a list of use-list orders to write out, and discards the table. This is a simpler first step than determining the order from the various overlapping IDs of values on-the-fly. - The shuffles stored in the use-list order list have an unnecessarily large memory footprint. - `blockaddress` expressions cause functions to be materialized out-of-order. For now I've ignored this problem, so use-list orders will be wrong for constants used by functions that have block addresses taken. There are a couple of ways to fix this, but I don't have a concrete plan yet. - When materializing functions lazily, the use-lists for constants will not be correct. This use case is out of scope: what should the use-list order be, if it's incomplete? This is part of PR5680. llvm-svn: 214125
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-061-4/+5
| | | | llvm-svn: 212405
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-3/+1
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-251-17/+17
| | | | llvm-svn: 207176
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-2/+1
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [cleanup] Move the Dominators.h and Verifier.h headers into the IRChandler Carruth2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | directory. These passes are already defined in the IR library, and it doesn't make any sense to have the headers in Analysis. Long term, I think there is going to be a much better way to divide these matters. The dominators code should be fully separated into the abstract graph algorithm and have that put in Support where it becomes obvious that evn Clang's CFGBlock's can use it. Then the verifier can manually construct dominance information from the Support-driven interface while the Analysis library can provide a pass which both caches, reconstructs, and supports a nice update API. But those are very long term, and so I don't want to leave the really confusing structure until that day arrives. llvm-svn: 199082
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-1/+4
| | | | llvm-svn: 196908
* Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz2013-10-121-0/+1
| | | | llvm-svn: 192519
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-251-1/+1
| | | | llvm-svn: 184826
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-121-1/+1
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Update with attribute group IDs.Bill Wendling2013-02-101-11/+14
| | | | llvm-svn: 174847
* switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion ofChris Lattner2013-01-201-69/+73
| | | | | | the old ReadRecord methods. llvm-svn: 172952
* fix method name.Chris Lattner2013-01-191-1/+1
| | | | llvm-svn: 172921
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-3/+2
| | | | | | | | 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
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-281-0/+1
| | | | | | | This is for backwards compatibility for pre-3.x bc files. The code reads the code, but does nothing with it. llvm-svn: 168779
* Remove the dependent libraries feature.Bill Wendling2012-11-271-1/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Adjust llvm-ar and llvm-ranlib to not depend on exception handling.Joerg Sonnenberger2012-10-261-1/+0
| | | | | | | | Always use an exit code of 1, but print the help message if useful. Remove the exception handling tag in llvm-as, llvm-dis and llvm-bcanalyzer, where it isn't used. llvm-svn: 166767
* Stop casting away const qualifier needlessly.Roman Divacky2012-09-051-1/+1
| | | | llvm-svn: 163258
* Fix a bug.Jan Wen Voung2012-09-051-1/+1
| | | | llvm-svn: 163242
* revert the additional stuff.Jan Wen Voung2012-09-051-6/+4
| | | | llvm-svn: 163241
* Clean up llvm-bcanalyzer to print to consistent streams.Jan Wen Voung2012-09-051-13/+17
| | | | | | | | Avoid interleaving fprintf(stderr,...) and outs() << ...; Also add a column to show "bytes-per" for each record. llvm-svn: 163240
* fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for ↵Chris Lattner2012-03-191-48/+48
| | | | | | errors). llvm-svn: 153065
* Enable streaming of bitcodeDerek Schuff2012-02-061-3/+3
| | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
* [unwind removal] Remove a the obsolete 'unwind' enum value.Bill Wendling2012-02-061-1/+0
| | | | llvm-svn: 149911
* Add bitcode reader and writer support for ConstantDataAggregate, whichChris Lattner2012-01-301-0/+2
| | | | | | should be feature complete now. Lets see if it works. llvm-svn: 149215
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-1/+0
| | | | llvm-svn: 147855
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Update bcanalyzer to handle new USELIST_BLOCK/USELIST_CODE_ENTRY.Chad Rosier2011-12-071-0/+6
| | | | llvm-svn: 146079
* remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible ↵Chris Lattner2011-11-271-10/+0
| | | | | | back to 3.0 llvm-svn: 145164
* LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar2011-11-111-0/+23
| | | | llvm-svn: 144417
* Remove some cruft from the BitcodeWriter, while still maintaining backwardChad Rosier2011-11-031-1/+2
| | | | | | compatibility in the BitcodeReader. llvm-svn: 143598
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-181-3/+3
| | | | | | new all-targets pseudo-component. llvm-svn: 142401
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Drop the "2" suffix on some enums.Chris Lattner2011-06-171-3/+3
| | | | llvm-svn: 133274
* remove support for a bunch of obsolete instruction encodingsChris Lattner2011-06-171-6/+0
| | | | | | and other backward compatibility hacks. llvm-svn: 133273
* Remove some "2" suffixes from the metadata enums now that "1" is gone.Chris Lattner2011-06-171-4/+4
| | | | llvm-svn: 133269
* remove bitcode reader support for LLVM 2.7 metadata encoding.Chris Lattner2011-06-171-5/+0
| | | | llvm-svn: 133268
* llvm-bcanalyzer.cpp: Tweak format string to suppress warnings on mingw32-g++.NAKAMURA Takumi2011-03-181-5/+5
| | | | llvm-svn: 127858
* fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!Chris Lattner2011-02-111-1/+1
| | | | llvm-svn: 125367
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-5/+5
| | | | | | via an out parm. llvm-svn: 121958
OpenPOWER on IntegriCloud