summaryrefslogtreecommitdiff
path: root/tools/llvm-bcanalyzer
Commit message (Collapse)AuthorAge
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the "2" suffix on some enums.Chris Lattner2011-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133274 91177308-0d34-0410-b5e6-96231b3b80d8
* remove support for a bunch of obsolete instruction encodingsChris Lattner2011-06-17
| | | | | | | and other backward compatibility hacks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133273 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some "2" suffixes from the metadata enums now that "1" is gone.Chris Lattner2011-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133269 91177308-0d34-0410-b5e6-96231b3b80d8
* remove bitcode reader support for LLVM 2.7 metadata encoding.Chris Lattner2011-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133268 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-bcanalyzer.cpp: Tweak format string to suppress warnings on mingw32-g++.NAKAMURA Takumi2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127858 91177308-0d34-0410-b5e6-96231b3b80d8
* fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!Chris Lattner2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125367 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-16
| | | | | | via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
* Give CurStreamType's enum a name. This works around what is apparentlyDan Gohman2010-12-09
| | | | | | | a bug in Apple GCC 4.0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121409 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-09
| | | | | | error_code &ec. And fix clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-13
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
* Discard metadata produced by LLVM 2.7. The value enumeration it usedDan Gohman2010-09-09
| | | | | | | | | | | | | | is different from what the code now uses in a two ways: NamedMDNodes were considered Values and included in the numbering, and the function-local metadata counter wasn't reset between functions. The later problem breaks lazy deserialization, so instead of trying to emulate the old numbering, just drop the old metadata. The only in-tree use case is debug info with LTO, where the QOI loss is considered acceptable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused command-line option.Dan Gohman2010-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111367 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm-bcanalyzer print out the full enum name for all metadataDan Gohman2010-07-16
| | | | | | | code ids, not just some of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108543 91177308-0d34-0410-b5e6-96231b3b80d8
* Add special case bitcode support for DebugLoc. This avoidsChris Lattner2010-04-03
| | | | | | | | | | | | | | having the bitcode writer materialize mdnodes for all the debug location tuples when writing out the bc file and stores the information in a more compact form. For example, the -O0 -g bc file for combine.c in 176.gcc shrinks from 739392 to 512096 bytes. This concludes my planned short-term debug info work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
* add a couple missing enum names.Chris Lattner2010-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100257 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-22
| | | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm-bcanalyzer percentages more readable.Daniel Dunbar2009-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82772 91177308-0d34-0410-b5e6-96231b3b80d8
* Strip trailing whitespace.Daniel Dunbar2009-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82771 91177308-0d34-0410-b5e6-96231b3b80d8
* Print INST_INBOUNDS_GEP rather than UnknownCode30.Duncan Sands2009-09-25
| | | | | | | Likewise for constant inbounds GEP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82763 91177308-0d34-0410-b5e6-96231b3b80d8
* Write and read metadata attachments.Devang Patel2009-09-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build when using gcc-4.4 on linux. Header neededDuncan Sands2009-08-24
| | | | | | | for stderr and fprintf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79909 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle NamedMDNode.Devang Patel2009-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77633 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-23
| | | | | | METADATA_BLOCK in bitcode file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-22
| | | | | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
* Use errs() instead of std::cerr.Dan Gohman2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing codenames to the .bc analyzer.Nick Lewycky2009-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72684 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compiler warning on hosts where uint64_t isn't unsigned long long.Dan Gohman2009-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70548 91177308-0d34-0410-b5e6-96231b3b80d8
* give bitstreamreader an API to ignore names for blocks/records,Chris Lattner2009-04-27
| | | | | | | only llvm-bcanalyzer wants this info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70239 91177308-0d34-0410-b5e6-96231b3b80d8
* Print statistics for each record kind saying the number of bitsChris Lattner2009-04-27
| | | | | | | | | | | | | | | | | and % abbreviated. For example: Record Histogram: Count # Bits % Abv Record Kind 25738 3424174 100.00 SM_SLOC_INSTANTIATION_ENTRY 814 562079 100.00 SM_SLOC_FILE_ENTRY 798 34110 SM_HEADER_FILE_INFO 3 91104 100.00 SM_SLOC_BUFFER_BLOB 3 498 100.00 SM_SLOC_BUFFER_ENTRY 1 465 SM_LINE_TABLE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70215 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up the output of llvm-bcanalyzer by using printfChris Lattner2009-04-27
| | | | | | | instead of ostreams for formatting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70214 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new record types to the blockinfo block:Chris Lattner2009-04-26
| | | | | | | | | | BLOCKNAME and SETRECORDNAME. This allows a bitcode file to be self describing with pretty names for records and blocks in addition to numbers. This enhances llvm-bcanalyzer to use this to print prettily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70165 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a major API change to BitstreamReader: split all the readingChris Lattner2009-04-26
| | | | | | | | | | state out of the BitstreamReader class into a BitstreamCursor class. Doing this allows the client to have multiple cursors into the same file, each with potentially different live block stacks and abbreviation records. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an API for the bitstream reader to read blobs and returnChris Lattner2009-04-07
| | | | | | | | them by reference, instead of packing each byte into a smallvector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68486 91177308-0d34-0410-b5e6-96231b3b80d8
* stub out code for reading record with blobs as blobs. Not active yet.Chris Lattner2009-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68472 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.Chris Lattner2009-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68458 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CHAR_BIT instead of hard-coding 8 in several places where itDan Gohman2009-04-01
| | | | | | | | is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-06
| | | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
* disable exports from a bunch more tools, those without plugins.Chris Lattner2009-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65558 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to add newer bitcodes.Nick Lewycky2008-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58852 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for the CMake build system.Oscar Fuentes2008-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-25
| | | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the MemoryBuffer::getFile* methods to take just a pointer to theChris Lattner2008-04-01
| | | | | | | | | start of a filename, not a filename+length. All clients can produce a null terminated name, and the system api's require null terminated strings anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an unwind_to field to basic blocks, making them Users instead of Values.Nick Lewycky2008-03-02
| | | | | | | This is the first checkin for PR1269, the new EH infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
* Also handle "getresult".Nick Lewycky2008-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47797 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8