summaryrefslogtreecommitdiff
path: root/tools/llvm-bcanalyzer
Commit message (Collapse)AuthorAge
...
* 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
* remove attributions from tools/utils makefiles.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement address space attribute for LLVM pointer types. Address spaces are Christopher Lamb2007-12-11
| | | | | | | | | | | | | | | | | | regions of memory that have a target specific relationship, as described in the Embedded C Technical Report. This also implements the 2007-12-11-AddressSpaces test, which demonstrates how address space attributes can be used in LLVM IR. In addition, this patch changes the bitcode signature for stores (in a backwards compatible manner), such that the pointer type, rather than the pointee type, is encoded. This permits type information in the pointer (e.g. address space) to be preserved for stores. LangRef updates are forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the space in overview output for commands out of each of theDan Gohman2007-10-08
| | | | | | | commands and into the common code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty straightforward replacement of "bytecode" by "bitcode"Gabor Greif2007-07-04
| | | | | | | performed on tools/ first, in order not to cause lethal damage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37877 91177308-0d34-0410-b5e6-96231b3b80d8
* switch tools to bitcode instead of bytecodeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
* add inline asm codeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36826 91177308-0d34-0410-b5e6-96231b3b80d8
* add a denser encoding for null terminated strings, add a 6-bit abbrev asChris Lattner2007-05-06
| | | | | | | well. This shrinks kc++ from 2724088 to 2717360 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
* emit spiffy little histograms of codes, if enabled. Don't print averages ifChris Lattner2007-05-05
| | | | | | | there is only one item. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36773 91177308-0d34-0410-b5e6-96231b3b80d8
* do not charge subblock sizes to the parent block.Chris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36772 91177308-0d34-0410-b5e6-96231b3b80d8
* update to new APIs, make output a bit (haha) nicerChris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36768 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for new codes/blockChris Lattner2007-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36726 91177308-0d34-0410-b5e6-96231b3b80d8
* add phiChris Lattner2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36611 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement much expanded dumper support. We now print stuff like:Chris Lattner2007-04-29
| | | | | | | | | | | | | | | | | | | <MODULE_BLOCK NumWords=27 BlockCodeSize=3> <TYPE_BLOCK NumWords=7 BlockCodeSize=4> <NUMENTRY op0=7> <POINTER op0=1> <FUNCTION op0=0 op1=2 op2=2 op3=2 op4=2> <VECTOR op0=2 op1=3> <INTEGER op0=64> <VECTOR op0=8 op1=5> <INTEGER op0=16> <VOID> ... With work, the operands can be pretty printed symbolically. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36579 91177308-0d34-0410-b5e6-96231b3b80d8
* add some simple per-block statisticsChris Lattner2007-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36576 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support to read an arbitrary bitcode file. Next up, dumping theChris Lattner2007-04-29
| | | | | | | file symbolically and actually computing statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36557 91177308-0d34-0410-b5e6-96231b3b80d8
* very early support for analyzing a bitstream. This opens the file, startsChris Lattner2007-04-29
| | | | | | | reading the stream, and detects whether it is LLVM IR or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36556 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 colsChris Lattner2007-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36551 91177308-0d34-0410-b5e6-96231b3b80d8
* push bytecode decompressor out through APIs. Now the bytecode readerChris Lattner2007-02-07
| | | | | | | | | | | | | | | | | | | | | api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0 ///< Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider("foo", 0); If they do this, there is no dependency on the compression libraries, saving codesize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-06
| | | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-02
| | | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LINK_COMPONENTS to specify *components* to link against instead ofChris Lattner2006-09-04
| | | | | | | using USED_LIBS to specify *libraries* to link against. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30090 91177308-0d34-0410-b5e6-96231b3b80d8
* Tools require EH for their top-level try blocks.Chris Lattner2006-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29035 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the verifier to never throw an exception. Instead verifyModule ↵Chris Lattner2006-07-06
| | | | | | canoptionally return the string error, which is an easier api for clients touse anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8