aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
* Build BitcodeWriter for device as well.Stephen Hines2011-07-131-5/+21
| | | | | | BUG=4278636 Change-Id: Id16d7a74c19e8575af4391997bd226b26498053e
* Recover LLVM 2.7 parse bitcode backward-compatible.Nowar Gu2011-06-252-8/+105
| | | | | | | | | | | | | Since LLVM 3.0 modify the bitcode format, it will break old bitcode. I fix the following commit by Chris Lattner. 020a5a449f297ced1f0fed08fb81c5da87fb7c9a 9d61dd9a088be975df4beb4632a39ed009bd0ef5 96a74c57d9e8fe0595ba8308eec1276cf8bcf6b0 4f6bab98c54a93276b8370d3f61f63bf765f7e1f Now LLVM can support *READ* either old or new version bitcode. That won't make trouble on Android legacy code.
* Merge upstream to r133679 at Thu. 23th Jun 2011.Nowar Gu2011-06-233-165/+40
|\
| * Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-221-1/+1
| | | | | | | | | | | | that takes an ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make better use of the PHINode API.Jay Foad2011-06-201-4/+8
| | | | | | | | | | | | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133434 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412 91177308-0d34-0410-b5e6-96231b3b80d8
| * Drop the "2" suffix on some enums.Chris Lattner2011-06-172-6/+6
| | | | | | | | 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-171-92/+11
| | | | | | | | | | | | | | and other backward compatibility hacks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133273 91177308-0d34-0410-b5e6-96231b3b80d8
| * missed a file.Chris Lattner2011-06-171-5/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133270 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove some "2" suffixes from the metadata enums now that "1" is gone.Chris Lattner2011-06-171-7/+7
| | | | | | | | 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-172-48/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133268 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge upstream to r133240 at Fri. 17th Jun 2011.Nowar Gu2011-06-203-65/+31
|\ \ | |/ | | | | | | | | Conflicts: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/ARM/ARMCodeEmitter.cpp
| * Update BitcodeWriter to match recent Triple changes. rdar://9603399Evan Cheng2011-06-141-46/+12
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132959 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert name change from r132533. Lower case naming was intended per style ↵Chad Rosier2011-06-033-7/+7
| | | | | | | | | | | | guidelines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132555 91177308-0d34-0410-b5e6-96231b3b80d8
| * Whitespace and other cleanup. Functionallity unchanged.Chad Rosier2011-06-034-15/+10
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132533 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix LTO builds with xcode 4.Rafael Espindola2011-05-261-1/+11
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132132 91177308-0d34-0410-b5e6-96231b3b80d8
| * It's valid to take the blockaddress of a different function, so remove thisNick Lewycky2011-05-061-2/+0
| | | | | | | | | | | | | | | | assert in the bitcode writer. No change needed because the ValueEnumerator holds a whole-module numbering anyhow. Fixes PR9857! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131016 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-211-4/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | | | | | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR9214: Convert ConstantExpr::getWithOperands() to use ArrayRef.Jay Foad2011-04-131-2/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129439 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix or remove code which seemed to think that the operand of a ConstantJay Foad2011-04-111-1/+1
| | | | | | | | | | | | was always a User. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129272 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r129235 pending a vetting of the EH rewrite.Bill Wendling2011-04-102-31/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r129235 into '.': D test/Feature/bb_attrs.ll U include/llvm/BasicBlock.h U include/llvm/Bitcode/LLVMBitCodes.h U lib/VMCore/AsmWriter.cpp U lib/VMCore/BasicBlock.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLLexer.cpp U lib/AsmParser/LLToken.h U lib/Bitcode/Reader/BitcodeReader.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129259 91177308-0d34-0410-b5e6-96231b3b80d8
| * Beginning of the Great Exception Handling Rewrite.Bill Wendling2011-04-102-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a "landing pad" attribute to the BasicBlock. * Modify the bitcode reader and writer to handle said attribute. Later: The verifier will ensure that the landing pad attribute is used in the appropriate manner. I.e., not applied to the entry block, and applied only to basic blocks that are branched to via a `dispatch' instruction. (This is a work-in-progress.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129235 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge upstream r129128Jush Lu2011-04-094-31/+72
|\ \ | |/
| * Do a topological sort of the types before writing them out.Rafael Espindola2011-04-063-29/+71
| | | | | | | | | | | | This takes the linking of libxul on linux from 6m54.931s to 5m39.840s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129009 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | | | | | | | PHINode::Create() giving the (known or expected) number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge upstream r127116Jush Lu2011-03-093-21/+51
|\ \ | |/
| * Move library stuff out of the toplevel CMakeLists.txt file.Oscar Fuentes2011-02-181-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125968 91177308-0d34-0410-b5e6-96231b3b80d8
| * convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-151-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
| * revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-1/+1
| | | | | | | | | | | | | | builders unhappy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
| * Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-141-1/+1
| | | | | | | | | | | | | | idiom. Change various clients to simplify their code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
| * implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-071-4/+10
| | | | | | | | | | | | | | Factor some code better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
| * enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-062-7/+10
| | | | | | | | | | | | | | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
| * FixedNumOperandTraits and VariadicOperandTraits assumed that, given aJay Foad2011-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | "this" pointer for any subclass of User, you could static_cast it to User* and then reinterpret_cast that to Use* to get the end of the operand list. This isn't a safe assumption in general, because the static_cast might adjust the "this" pointer. Fixed by having these OperandTraits classes take an extra template parameter, which is the subclass of User. This is groundwork for PR889. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123235 91177308-0d34-0410-b5e6-96231b3b80d8
| * First step in fixing PR8927:Rafael Espindola2011-01-082-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123063 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122193 91177308-0d34-0410-b5e6-96231b3b80d8
| * Generalize the darwin wrapper hack to work with generic macho triples as ↵Chris Lattner2010-11-291-4/+7
| | | | | | | | | | | | well as darwin ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120346 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix PR8494: when reading invalid bitcode, getTypeByID may returnDuncan Sands2010-10-281-2/+7
| | | | | | | | | | | | | | a null pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117551 91177308-0d34-0410-b5e6-96231b3b80d8
| * Provide a fast "get me the target triple from the module" API. This canBill Wendling2010-10-062-1/+129
| | | | | | | | | | | | | | | | | | drastically reduce the linking time during LTO. Patch by Shantonu Sen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115728 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix spelling.Bill Wendling2010-09-281-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114974 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-131-2/+0
| | | | | | | | | | | | | | | | | | | | 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
| * Add full auto-upgrade support for LLVM 2.7 bitcode metadata.Dan Gohman2010-09-132-31/+49
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113764 91177308-0d34-0410-b5e6-96231b3b80d8
| * CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-101-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add X86 MMX type to bitcode and Type.Dale Johannesen2010-09-102-0/+4
| | | | | | | | | | | | | | | | | | (The Ada bindings probably need it too, but all the obvious places to change say "do not edit this file".) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
| * Auto-upgrade the magic ".llvm.eh.catch.all.value" global toBill Wendling2010-09-101-0/+6
| | | | | | | | | | | | | | "llvm.eh.catch.all.value". Only the name needs to be changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113600 91177308-0d34-0410-b5e6-96231b3b80d8
| * Discard metadata produced by LLVM 2.7. The value enumeration it usedDan Gohman2010-09-092-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * zap dead code.Chris Lattner2010-09-041-2/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113073 91177308-0d34-0410-b5e6-96231b3b80d8
| * remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-282-47/+0
| | | | | | | | | | | | | | being actively maintained, improved, or extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a FIXME comment.Dan Gohman2010-08-251-0/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112083 91177308-0d34-0410-b5e6-96231b3b80d8