summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
Commit message (Collapse)AuthorAge
* Change encoding of instruction operands in bitcode binaries to be relativeJan Wen Voung2012-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-27
| | | | | | 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-27
| | | | 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-18
| | | | | | LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164090 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-17
| | | | | | LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164017 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect toChad Rosier2012-09-05
| | | | | | | inteldialect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163231 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Add support for the nsdialect keyword in the BitcodeChad Rosier2012-09-05
| | | | | | Reader/Writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163185 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162446 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify PVS-Studio by changing the type rather than doing a cast, a tweakDuncan Sands2012-08-21
| | | | | | | suggested by David Blaikie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162286 91177308-0d34-0410-b5e6-96231b3b80d8
* PVS-Studio noticed that EmitVBR64 would perform undefined behaviour if theDuncan Sands2012-08-21
| | | | | | | | | | number of bits was bigger than 32. I checked every use of this function that I could find and it looks like the maximum number of bits is 32, so I've added an assertion checking this property, and a type cast to (hopefully) stop PVS-Studio from warning about this in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162277 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2012-08-10
| | | | | | switched from a bytecode+bzip2 to the current bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'static' from inline functions defined in header files.Chandler Carruth2012-06-20
| | | | | | | | | | | | | | | | | There is a pretty staggering amount of this in LLVM's header files, this is not all of the instances I'm afraid. These include all of the functions that (in my build) are used by a non-static inline (or external) function. Specifically, these issues were caught by the new '-Winternal-linkage-in-inline' warning. I'll try to just clean up the remainder of the clearly redundant "static inline" cases on functions (not methods!) defined within headers if I can do so in a reliable way. There were even several cases of a missing 'inline' altogether, or my personal favorite "static bool inline". Go figure. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158800 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r156383: removal of TYPE_CODE_FUNCTION_OLDNuno Lopes2012-05-23
| | | | | | Apparently LLVM only stopped emitting this after LLVM 3.0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157325 91177308-0d34-0410-b5e6-96231b3b80d8
* remove TYPE_CODE_FUNCTION_OLD type code. it is no longer in use and it was ↵Nuno Lopes2012-05-08
| | | | | | marked for removal in 3.0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156383 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows compilation warning. Patch by Micah.Jan Sjödin2012-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153215 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the small vector POD optimization for BitCodeAbbrevOp.Benjamin Kramer2012-03-03
| | | | | | While at it bump the small vector size a bit, it's inside a heap-allocated class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151980 91177308-0d34-0410-b5e6-96231b3b80d8
* BitstreamWriter: Use SmallVector::append instead of multiple push_back calls.Daniel Dunbar2012-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151755 91177308-0d34-0410-b5e6-96231b3b80d8
* BitstreamWriter: Change primary output buffer to be a SmallVector instead of anDaniel Dunbar2012-02-29
| | | | | | | | | std::vector. - Good for 1-2% speedup on writing PCH for Cocoa.h. - Clang side API match to follow shortly, there wasn't an easy way to make this non-breaking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151750 91177308-0d34-0410-b5e6-96231b3b80d8
* BitstreamWriter: Isolate access to the underlying buffer.Daniel Dunbar2012-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151749 91177308-0d34-0410-b5e6-96231b3b80d8
* BitcodeWriter: Expose less implementation details -- make BackpatchWord privateDaniel Dunbar2012-02-29
| | | | | | and remove getBuffer(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151748 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcode: Don't expose WriteBitcodeToStream to clients.Daniel Dunbar2012-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151747 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcode/BitstreamReader.h: Tweak for big endian hosts.NAKAMURA Takumi2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149980 91177308-0d34-0410-b5e6-96231b3b80d8
* System headers after llvm headers.Nick Lewycky2012-02-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149919 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable streaming of bitcodeDerek Schuff2012-02-06
| | | | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149918 91177308-0d34-0410-b5e6-96231b3b80d8
* [unwind removal] Remove a the obsolete 'unwind' enum value.Bill Wendling2012-02-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149911 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
* Add bitcode reader and writer support for ConstantDataAggregate, whichChris Lattner2012-01-30
| | | | | | | should be feature complete now. Lets see if it works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149215 91177308-0d34-0410-b5e6-96231b3b80d8
* The iteration order over a std::set<Module*> depends on the addresses of theRafael Espindola2012-01-23
| | | | | | modules. Avoid that to make the order the linker sees the modules deterministic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148676 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'llvm_unreachable' to passify GCC's understanding of the constraintsChandler Carruth2012-01-10
| | | | | | | | of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147861 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-17
| | | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-14
| | | | | | free function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146531 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin sketching out a bitcode verifier pass. Idea is to emit a .bc file andChad Rosier2011-12-12
| | | | | | | then read the file back in to verify use-list serialization/deserialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146439 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80-column.Chad Rosier2011-12-08
| | | | | | | Simplify code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146112 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Chad Rosier2011-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146109 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Chad Rosier2011-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146107 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin adding experimental support for preserving use-list ordering of bitcodeChad Rosier2011-12-07
| | | | | | | | | | files. First, add a new block USELIST_BLOCK to the bitcode format. This is where USELIST_CODE_ENTRYs will be stored. The format of the USELIST_CODE_ENTRYs have not yet been defined. Add support in the BitcodeReader for parsing the USELIST_BLOCK. Part of rdar://9860654 and PR5680. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146078 91177308-0d34-0410-b5e6-96231b3b80d8
* remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible ↵Chris Lattner2011-11-27
| | | | | | back to 3.0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145164 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some cruft from the BitcodeWriter, while still maintaining backwardChad Rosier2011-11-03
| | | | | | | compatibility in the BitcodeReader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143598 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-12
| | | | | | | | | | | | | This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way. This patch has the definition, implementation, C interface, parsing, and bitcode support in it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
* Representation of 'atomic load' and 'atomic store' in IR.Eli Friedman2011-08-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137170 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-31
| | | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-30
| | | | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-27
| | | | | | | This adds the new instructions 'landingpad' and 'resume'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial implementation of 'fence' instruction, the new C++0x-style ↵Eli Friedman2011-07-25
| | | | | | | | | | replacement for llvm.memory.barrier. This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* fix a really bad bug that would cause nested cursors to break,Chris Lattner2011-07-09
| | | | | | | used by the new bitcode reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134821 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the sanity check for block sizes; check that the resulting pointer isNick Lewycky2011-06-25
| | | | | | | | pointing to the range [first character, last character] instead of just not after the last character. Patch by Yan Ivnitskiy! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133867 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