aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-184-9/+25
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Update aosp/master llvm for rebase to r233350Pirama Arumuga Nainar2015-04-092-5/+4
| | | | Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-235-61/+78
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-026-232/+207
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-212-9/+16
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-294-14/+15
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-245-21/+65
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Add addrspacecast instruction.Matt Arsenault2013-11-151-1/+2
| | | | | | Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-231-1/+2
| | | | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189101 91177308-0d34-0410-b5e6-96231b3b80d8
* Make .bc en/decoding of AttrKind stableTobias Grosser2013-07-261-0/+41
| | | | | | | | | | | | | | | | The bitcode representation attribute kinds are encoded into / decoded from should be independent of the current set of LLVM attributes and their position in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode values. With this patch applied, LLVM does not silently misread attributes written by LLVM 3.3. We also enhance the decoding slightly such that an error message is printed if an unknown AttrKind encoding was dected. Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds do not need to be kept to support the Bitcode reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187186 91177308-0d34-0410-b5e6-96231b3b80d8
* Move lib/Archive to tools/llvm-ar.Rafael Espindola2013-06-171-524/+0
| | | | | | | | llvm-ar is the only tool that needs to write archive files. Every other tool should be able to use the lib/Object interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the LLVM specific archive index.Rafael Espindola2013-06-141-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Archive files (.a) can have a symbol table indicating which object files in them define which symbols. The purpose of this symbol table is to speed up linking by allowing the linker the read only the .o files it is actually going to use instead of having to parse every object's symbol table. LLVM's archive library currently supports a LLVM specific format for such table. It is hard to see any value in that now that llvm-ld is gone: * System linkers don't use it: GNU ar uses the same plugin as the linker to create archive files with a regular index. The OS X ar creates no symbol table for IL files, I assume the linker just parses all IL files. * It doesn't interact well with archives having both IL and native objects. * We probably don't want to be responsible for yet another archive format variant. This patch then: * Removes support for creating and reading such index from lib/Archive. * Remove llvm-ranlib, since there is nothing left for it to do. We should in the future add support for regular indexes to llvm-ar for both native and IL objects. When we do that, llvm-ranlib should be reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019 91177308-0d34-0410-b5e6-96231b3b80d8
* Include PathV1.h in files that use it.Rafael Espindola2013-06-111-0/+1
| | | | | | This is preparation for replacing Path.h with PathV2.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183782 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Copied parameter from MemoryObject::readBytes.Benjamin Kramer2013-05-241-3/+2
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182636 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite assert to avoid warning when the record element type is byte-sized.Jordan Rose2013-05-091-1/+2
| | | | | | | | | | BitstreamWriter asserts that when blob data is written from the record element vector, each element fits in a byte. However, if the record elements are specified as a SmallVector of 'char', this causes a warning from -Wtautological-constant-out-of-range-compare. Fix this by using llvm::isUInt<8> instead of a plain comparison against 256. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181545 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanupJoe Abbey2013-04-012-19/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178454 91177308-0d34-0410-b5e6-96231b3b80d8
* use memcpy instead of dubious union to type pun two values,Chris Lattner2013-02-131-8/+9
| | | | | | | thanks to David Blaike for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175032 91177308-0d34-0410-b5e6-96231b3b80d8
* Add code for emitting the attribute groups.Bill Wendling2013-02-101-8/+8
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174845 91177308-0d34-0410-b5e6-96231b3b80d8
* ok, ok, stop fighting type punning warnings by just using a union.Chris Lattner2013-02-101-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174827 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully "really" fix a type punning warning by defining the buffer asChris Lattner2013-02-101-3/+4
| | | | | | | type char, which can't have TBAA tags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174826 91177308-0d34-0410-b5e6-96231b3b80d8
* attempt to defeat a gcc warning that is breaking a -Werror buildbot.Chris Lattner2013-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174825 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the correct version of r174802.Chris Lattner2013-02-091-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174804 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a nasty off-by one error that only manifests with 64-bit word size (which isChris Lattner2013-02-091-1/+1
| | | | | | | not enabled yet). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174803 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the underlying problem that was causing read(0) to be called: sometimes theChris Lattner2013-02-091-2/+2
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174801 91177308-0d34-0410-b5e6-96231b3b80d8
* recommit r173072 (preparing bitstream reader to read a machine word at a time,Chris Lattner2013-02-091-21/+51
| | | | | | | | | | | | instead of always 32-bits at a time) with two changes: 1. Make Read(0) always return zero without affecting the state of our cursor. 2. Hack word_t to always be 32 bits, as staging. These two caveats will change shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174800 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial cleanups of the param-attribute code in the bitcode reader/writer.Bill Wendling2013-02-041-1/+6
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174335 91177308-0d34-0410-b5e6-96231b3b80d8
* r173072 is causing some regressions on big endian hosts, I don't have time ↵Chris Lattner2013-01-211-49/+21
| | | | | | | | | to debug it so revert it for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173074 91177308-0d34-0410-b5e6-96231b3b80d8
* rework the Bitstream reader to actually work a machine word at a time, ↵Chris Lattner2013-01-211-21/+49
| | | | | | | | | | instead of 32-bits at a time. This cuts in half the number of virtual methods called to refill that word when compiling on a 64-bit host, and will make 64-bit read operations faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173072 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a heinous inefficiency introduced in r149918, wherein reading each byte of aChris Lattner2013-01-211-6/+0
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173065 91177308-0d34-0410-b5e6-96231b3b80d8
* rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 ↵Chris Lattner2013-01-211-3/+3
| | | | | | bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173062 91177308-0d34-0410-b5e6-96231b3b80d8
* trivial micro-optimization: lazily call the virtual method instead of ↵Chris Lattner2013-01-201-2/+1
| | | | | | eagerly calling it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172953 91177308-0d34-0410-b5e6-96231b3b80d8
* switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion ofChris Lattner2013-01-201-16/+1
| | | | | | | the old ReadRecord methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172952 91177308-0d34-0410-b5e6-96231b3b80d8
* add an option to not auto-process abbreviations in advance()Chris Lattner2013-01-201-4/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172946 91177308-0d34-0410-b5e6-96231b3b80d8
* stringref'ize readRecord and properly capitalize it. Add a compatibility ↵Chris Lattner2013-01-201-2/+13
| | | | | | | | | method to easy the transition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172940 91177308-0d34-0410-b5e6-96231b3b80d8
* move some private methods out of line, add a skipRecord() method.Chris Lattner2013-01-201-26/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172931 91177308-0d34-0410-b5e6-96231b3b80d8
* add some optional flags to affect the way advance works.Chris Lattner2013-01-191-4/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172928 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new BitstreamEntry concept, and add two helper methods for walkingChris Lattner2013-01-191-6/+91
| | | | | | | | | through a BitstreamCursor that produce it: advance() and advanceSkippingSubblocks(), representing the two most common ways clients want to walk through bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172919 91177308-0d34-0410-b5e6-96231b3b80d8
* BitstreamReader hasn't aged well. It's been hacked on by various people andChris Lattner2013-01-191-226/+12
| | | | | | | | has past the point of making sense. Lets tidy things up: first step, moving a ton of big functions out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172904 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-103-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the bitcode reader/writer just use FPMathOperator's fast math enum directlyMichael Ilseman2012-12-091-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169710 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-281-0/+3
| | | | | | | | This is for backwards compatibility for pre-3.x bc files. The code reads the code, but does nothing with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168779 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the dependent libraries feature.Bill Wendling2012-11-271-1/+0
| | | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math flags for the bitcodeMichael Ilseman2012-11-271-0/+10
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168646 91177308-0d34-0410-b5e6-96231b3b80d8
* Code Custodian:Joe Abbey2012-11-254-71/+72
| | | | | | | | | | - Widespread trailing space removal - A dash of OCD spacing to block align enums - joined a line that probably needed 80 cols a while back git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMichael Ilseman2012-11-151-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168103 91177308-0d34-0410-b5e6-96231b3b80d8
* Change encoding of instruction operands in bitcode binaries to be relativeJan Wen Voung2012-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | to the instruction position. The old encoding would give an absolute ID which counts up within a function, and only resets at the next function. I.e., Instead of having: ... = icmp eq i32 n-1, n-2 br i1 ..., label %bb1, label %bb2 it will now be roughly: ... = icmp eq i32 1, 2 br i1 1, label %bb1, label %bb2 This makes it so that ids remain relatively small and can be encoded in fewer bits. With this encoding, forward reference operands will be given negative-valued IDs. Use signed VBRs for the most common case of forward references, which is phi instructions. To retain backward compatibility we bump the bitcode version from 0 to 1 to distinguish between the different encodings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165739 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-7/+7
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-181-3/+3
| | | | | | LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164090 91177308-0d34-0410-b5e6-96231b3b80d8