summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
* Remove the Copied parameter from MemoryObject::readBytes.Benjamin Kramer2013-05-241-1/+1
| | | | | | | | | | There was exactly one caller using this API right, the others were relying on specific behavior of the default implementation. Since it's too hard to use it right just remove it and standardize on the default behavior. Defines away PR16132. llvm-svn: 182636
* Micro-optimization: don't shift an entire bitcode record over to get the code.Jordan Rose2013-05-101-3/+10
| | | | | | | | | | | Previously, BitstreamCursor read an abbreviated record by splatting the whole thing into a data vector, then extracting and removing the /first/ element. Now, it reads the first element--the record code--separately from the actual field values. No (intended) functionality change. llvm-svn: 181639
* Add ArrayRef constructor from None, and do the cleanups that this ↵Dmitri Gribenko2013-05-051-1/+1
| | | | | | | | constructor enables Patch by Robert Wilhelm. llvm-svn: 181138
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-222-0/+2
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* Whitespace cleanupJoe Abbey2013-04-012-2/+2
| | | | llvm-svn: 178454
* Simplify code. No functionality change.Jakub Staszak2013-02-191-14/+7
| | | | llvm-svn: 175501
* Have the bitcode writer and reader handle the new attribute references.Bill Wendling2013-02-122-33/+11
| | | | | | | | The bitcode writer emits a reference to the attribute group that the object at the given index refers to. The bitcode reader is modified to read this in and map it back to the attribute group. llvm-svn: 174952
* Use the AttributeSet as the 'key' to the map instead of the 'raw' pointer.Bill Wendling2013-02-122-5/+6
| | | | llvm-svn: 174950
* Rename AttributeSets to AttributeGroups so that it's more meaningful.Bill Wendling2013-02-113-41/+41
| | | | llvm-svn: 174911
* Use a std::map so that we record the group ID.Bill Wendling2013-02-112-7/+8
| | | | llvm-svn: 174910
* [tsan/msan] adding thread_safety and uninitialized_checks attributesKostya Serebryany2013-02-112-2/+2
| | | | llvm-svn: 174864
* Fix unnecessary removal of const through cast machineryDavid Blaikie2013-02-111-4/+4
| | | | | | | | I have some uncommitted changes to the cast code that catch this sort of thing at compile-time but I still need to do some other cleanup before I can enable it. llvm-svn: 174853
* Add support in the bitcode reader to read the attribute groups.Bill Wendling2013-02-102-0/+82
| | | | | | | | | This reads the attribute groups. It currently doesn't do anything with them. NOTE: In the commit to the bitcode writer, the format *may* change in the near future. Which means that this code would also change. llvm-svn: 174849
* Add code for emitting the attribute groups.Bill Wendling2013-02-101-0/+53
| | | | | | | | | This is some initial code for emitting the attribute groups into the bitcode. NOTE: This format *may* change! Do not rely upon the attribute groups' bitcode not changing. llvm-svn: 174845
* Add support for attribute groups in the value enumerator.Bill Wendling2013-02-102-0/+24
| | | | | | | Attribute groups are essentially all AttributeSets which are used by the program. Enumerate them here. llvm-svn: 174844
* Fix the underlying problem that was causing read(0) to be called: sometimes theChris Lattner2013-02-091-3/+14
| | | | | | | | | | | | | | | bitcode writer would generate abbrev records saying that the abbrev should be filled with fixed zero-bit bitfields (this happens in the .bc writer when the number of types used in a module is exactly one, since log2(1) == 0). In this case, just handle it as a literal zero. We can't "just fix" the writer without breaking compatibility with existing bc files, so have the abbrev reader do the substitution. Strengthen the assert in read to reject reads of zero bits so we catch such crimes in the future, and remove the special case designed to handle this. llvm-svn: 174801
* Code Custodian (trivial whitespace cleanup)Joe Abbey2013-02-062-67/+66
| | | | llvm-svn: 174550
* Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword ↵Michael Gottesman2013-02-052-2/+7
| | | | | | externally_initialized. llvm-svn: 174340
* Initial cleanups of the param-attribute code in the bitcode reader/writer.Bill Wendling2013-02-042-7/+49
| | | | | | | | | Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced by another encoding. Keep around the current LLVM attribute encoder/decoder code, but move it to the bitcode directories so that no one's tempted to use them. llvm-svn: 174335
* Use an AttrBuilder to generate the correct AttributeSet.Bill Wendling2013-01-291-9/+4
| | | | | | | | | We no longer accept an encoded integer as representing all of the attributes. Convert this via the AttrBuilder class into an AttributeSet with the correct representation (an AttributeSetImpl that holds a list of Attribute objects). llvm-svn: 173750
* Use the AttributeSet instead of AttributeWithIndex object.Bill Wendling2013-01-271-3/+2
| | | | llvm-svn: 173598
* Remove some introspection functions.Bill Wendling2013-01-252-4/+6
| | | | | | | | The 'getSlot' function and its ilk allow introspection into the AttributeSet class. However, that class should be opaque. Allow access through accessor methods instead. llvm-svn: 173522
* Use the new 'getSlotIndex' method to retrieve the attribute's slot index.Bill Wendling2013-01-251-1/+1
| | | | llvm-svn: 173499
* Make APFloat constructor require explicit semantics.Tim Northover2013-01-221-6/+12
| | | | | | | | | Previously we tried to infer it from the bit width size, with an added IsIEEE argument for the PPC/IEEE 128-bit case, which had a default value. This default value allowed bugs to creep in, where it was inappropriate. llvm-svn: 173138
* Fix a heinous inefficiency introduced in r149918, wherein reading each byte of aChris Lattner2013-01-211-9/+8
| | | | | | | | BLOB (i.e., large, performance intensive data) in a bitcode file was switched to invoking one virtual method call per byte read. Now we do one virtual call per BLOB. llvm-svn: 173065
* wean Blob handling logic off of banging on NextChar directly. Instead, makeChris Lattner2013-01-211-10/+13
| | | | | | | it reason about the current bit position, which is always independent of the underlying cursors word size. llvm-svn: 173063
* rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 ↵Chris Lattner2013-01-211-3/+3
| | | | | | bytes. llvm-svn: 173062
* trivial micro-optimization: lazily call the virtual method instead of ↵Chris Lattner2013-01-201-1/+1
| | | | | | eagerly calling it. llvm-svn: 172953
* convert the bitstream reader itself and the IR .bc file parser to use the ↵Chris Lattner2013-01-202-248/+214
| | | | | | | | new advance() APIs, simplifying things and making a bunch of details more private to BitstreamCursor. llvm-svn: 172947
* stringref'ize readRecord and properly capitalize it. Add a compatibility ↵Chris Lattner2013-01-201-6/+7
| | | | | | | | method to easy the transition. llvm-svn: 172940
* move some private methods out of line, add a skipRecord() method.Chris Lattner2013-01-201-3/+111
| | | | llvm-svn: 172931
* Add a new BitstreamEntry concept, and add two helper methods for walkingChris Lattner2013-01-192-2/+2
| | | | | | | | through a BitstreamCursor that produce it: advance() and advanceSkippingSubblocks(), representing the two most common ways clients want to walk through bitcode. llvm-svn: 172919
* BitstreamReader hasn't aged well. It's been hacked on by various people andChris Lattner2013-01-193-4/+254
| | | | | | | has past the point of making sense. Lets tidy things up: first step, moving a ton of big functions out of line. llvm-svn: 172904
* Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test ↵Bill Wendling2013-01-091-1/+1
| | | | | | hangings. llvm-svn: 172020
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-026-24/+24
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* s/Raw/getBitMask/g to be more in line with current naming conventions. This ↵Bill Wendling2012-12-301-1/+1
| | | | | | method won't be sticking around. llvm-svn: 171244
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-194-8/+8
| | | | | | single attribute in the future. llvm-svn: 170502
* Reorganize FastMathFlags to be a wrapper around unsigned, and streamline ↵Michael Ilseman2012-12-092-15/+15
| | | | | | some interfaces. llvm-svn: 169712
* Have the bitcode reader/writer just use FPMathOperator's fast math enum directlyMichael Ilseman2012-12-092-10/+10
| | | | llvm-svn: 169710
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-075-15/+15
| | | | | | in the near future. llvm-svn: 169651
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-4/+4
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Minor tweaking to SmallVector static size.Michael Ilseman2012-12-031-1/+1
| | | | llvm-svn: 169176
* Since this SmallVector immediately grows on the next line, don't waste stack ↵Michael Ilseman2012-12-031-1/+1
| | | | | | space. SmallVector is still needed due to existing APIs growing their arguments llvm-svn: 169157
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-034-12/+12
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-281-0/+8
| | | | | | | 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-272-11/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Code pretificationJoe Abbey2012-11-271-8/+8
| | | | llvm-svn: 168661
* Fast-math flags for the bitcodeMichael Ilseman2012-11-272-0/+27
| | | | | | Added in bitcode enum for the serializing of fast-math flags. Added in the reading/writing of fast-math flags from the OptimizationFlags record for BinaryOps. llvm-svn: 168646
* Code Custodian:Joe Abbey2012-11-258-68/+67
| | | | | | | | - Widespread trailing space removal - A dash of OCD spacing to block align enums - joined a line that probably needed 80 cols a while back llvm-svn: 168566
OpenPOWER on IntegriCloud