summaryrefslogtreecommitdiff
path: root/lib/Bitcode
Commit message (Collapse)AuthorAge
...
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-15
| | | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-15
| | | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add special case bitcode support for DebugLoc. This avoidsChris Lattner2010-04-03
| | | | | | | | | | | | | | having the bitcode writer materialize mdnodes for all the debug location tuples when writing out the bc file and stores the information in a more compact form. For example, the -O0 -g bc file for combine.c in 176.gcc shrinks from 739392 to 512096 bytes. This concludes my planned short-term debug info work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
* If the bitcode reader input stream isn't a multiple of 4 bytes, it's moreDan Gohman2010-04-02
| | | | | | | | likely not a bitcode file at all, rather than being a bitcode file which is truncated. Check for this case and issue a more relevant error message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100156 91177308-0d34-0410-b5e6-96231b3b80d8
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-24
| | | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-22
| | | | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r98957, it broke ↵Gabor Greif2010-03-19
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-19
| | | | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-16
| | | | | | | handling constant unions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98680 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r98656, its breaking all over the place.Daniel Dunbar2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98662 91177308-0d34-0410-b5e6-96231b3b80d8
* improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98656 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.Erick Tryzelaar2010-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97858 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.Erick Tryzelaar2010-03-06
| | | | | | Luckily this never was released. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97857 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMWriteBitcodeToFileHandle should work on all architectures now.Erick Tryzelaar2010-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97856 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Module functions in place of module providers.Erick Tryzelaar2010-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97608 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the side-numbering of instructions used by metadata (which is needed toNick Lewycky2010-02-25
| | | | | | | | | | keep track of instructions that return void) per-function. This fixes PR5278. This breaks backwards compatibility with the metadata format. That's okay because we haven't released the metadata bitcode yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97132 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-16
| | | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify.Daniel Dunbar2010-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96269 91177308-0d34-0410-b5e6-96231b3b80d8
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-15
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
* Also recognize armv6t2-* and armv5te-* triplets.Evan Cheng2010-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96008 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM bitcode file magic.Evan Cheng2010-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96006 91177308-0d34-0410-b5e6-96231b3b80d8
* Function-local metadata whose operands had been optimized to no longer refer ↵Victor Hernandez2010-02-06
| | | | | | to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95467 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix (and test) function-local metadata that occurs before the instruction ↵Victor Hernandez2010-02-04
| | | | | | that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95269 91177308-0d34-0410-b5e6-96231b3b80d8
* We were not writing bitcode for function-local metadata whose operands have ↵Victor Hernandez2010-01-29
| | | | | | been erased (making it not have any more function-local operands) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94842 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-27
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the caseDan Gohman2010-01-25
| | | | | | | of a forward-reference, which doesn't use an "abbrev" encoding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94454 91177308-0d34-0410-b5e6-96231b3b80d8
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
* Respect operator precedence (and silence a gcc 4.3 warning).Benjamin Kramer2010-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94304 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94243 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-22
| | | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crasher trying to fold each element in a comparison between two vectorsNick Lewycky2010-01-21
| | | | | | | | | | | if one of the vectors didn't have elements (such as undef). Fixes PR 6096. Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would have <2 x i1> type if constant folding was successful and i1 type if it wasn't. This exposed a related issue in the bitcode reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94069 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code that chooses when to enumerate function-local metadata operandsVictor Hernandez2010-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93446 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid modifying ValueEnumerator's MD ValueList by choosing which ↵Victor Hernandez2010-01-14
| | | | | | function-local MD to write based on the function currently being written git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93441 91177308-0d34-0410-b5e6-96231b3b80d8
* In WriteFunction(), write function-local metadata before we write the ↵Victor Hernandez2010-01-14
| | | | | | instructions, so instruction's references to metadata are fully resolved by the time they get written. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93403 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up unnecessary return and bracketsVictor Hernandez2010-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93401 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typoVictor Hernandez2010-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93355 91177308-0d34-0410-b5e6-96231b3b80d8
* Write function-local metadata as a metadata subblock of a funciton blockVictor Hernandez2010-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93339 91177308-0d34-0410-b5e6-96231b3b80d8
* Enumerate function-local metadata (and its types and operands) only during ↵Victor Hernandez2010-01-13
| | | | | | function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93338 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse function-local metadata inside function blocksVictor Hernandez2010-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93337 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 93270 pending investigation of how stray non-constant values end up ↵Victor Hernandez2010-01-13
| | | | | | in ValueEnumerator's ValueList during WriteConstants() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93289 91177308-0d34-0410-b5e6-96231b3b80d8
* Make WriteConstants() more robust against stray values in ValueEnumerator's ↵Victor Hernandez2010-01-12
| | | | | | ValueList git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93270 91177308-0d34-0410-b5e6-96231b3b80d8
* s/NextValueNo/NextMDValueNo while processing metadata.Devang Patel2010-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93165 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-10
| | | | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93108 91177308-0d34-0410-b5e6-96231b3b80d8
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-09
| | | | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93079 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up this code, add a fixme.Chris Lattner2010-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93042 91177308-0d34-0410-b5e6-96231b3b80d8
* NamedMDNode is never used so there is no need to enumerate it here.Devang Patel2010-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93039 91177308-0d34-0410-b5e6-96231b3b80d8