summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
Commit message (Collapse)AuthorAgeFilesLines
...
* Code pretificationJoe Abbey2012-11-271-8/+8
| | | | llvm-svn: 168661
* Fast-math flags for the bitcodeMichael Ilseman2012-11-271-0/+15
| | | | | | 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-253-32/+32
| | | | | | | | - 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
* Make the AttrListPtr object a part of the LLVMContext.Bill Wendling2012-11-201-1/+1
| | | | | | | | | When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. llvm-svn: 168354
* 80 colsJoe Abbey2012-11-191-6/+9
| | | | llvm-svn: 168318
* Remove trailing whitespaceMichael Ilseman2012-11-151-36/+36
| | | | llvm-svn: 168103
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-1/+1
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Attributes RewriteBill Wendling2012-10-151-3/+4
| | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. llvm-svn: 165917
* Remove unnecessary classof()'sSean Silva2012-10-111-1/+0
| | | | | | | isa<> et al. automatically infer when the cast is an upcast (including a self-cast), so these are no longer necessary. llvm-svn: 165767
* Fix some typos 165739, spotted by Duncan.Jan Wen Voung2012-10-111-1/+1
| | | | llvm-svn: 165753
* Change encoding of instruction operands in bitcode binaries to be relativeJan Wen Voung2012-10-112-46/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 165739
* Use method to query if there are attributes.Bill Wendling2012-10-041-1/+1
| | | | llvm-svn: 165213
* Move remaining methods inside the Attributes class. Merge the 'Attribute' ↵Bill Wendling2012-09-251-1/+1
| | | | | | namespaces. llvm-svn: 164631
* BitcodeReader: Correctly insert blockaddress constant referring to a already ↵Benjamin Kramer2012-09-211-6/+22
| | | | | | | | | | | | parsed function. We inserted a placeholder that was never replaced because the function was already visited. Assert that all placeholders have been resolved when tearing down the bitcode reader. Fixes PR13895. llvm-svn: 164369
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Craig Topper2012-09-151-1/+1
| | | | llvm-svn: 163974
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-061-1/+1
| | | | llvm-svn: 163324
* [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect toChad Rosier2012-09-051-3/+4
| | | | | | inteldialect. llvm-svn: 163231
* Add a FIXME that assumes we maintain backward compatibility until the next ↵Chad Rosier2012-09-051-0/+1
| | | | | | major release. llvm-svn: 163195
* [ms-inline asm] Add support for the nsdialect keyword in the BitcodeChad Rosier2012-09-051-1/+26
| | | | | | Reader/Writer. llvm-svn: 163185
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* Remove tabs.Bill Wendling2012-07-191-1/+1
| | | | llvm-svn: 160479
* llvm/lib: [CMake] Add explicit dependency to intrinsics_gen.NAKAMURA Takumi2012-06-241-0/+2
| | | | llvm-svn: 159112
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-4/+15
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy2012-05-291-2/+2
| | | | | | IntegersSubsetMapping. llvm-svn: 157612
* Remove unused variable.David Blaikie2012-05-281-2/+0
| | | | llvm-svn: 157586
* PR12696: Attribute bits above 1<<30 are not encoded in bitcodeMeador Inge2012-05-281-14/+2
| | | | | | | | | Attribute bits above 1<<30 are now encoded correctly. Additionally, the encoding/decoding functionality has been hoisted to helper functions in Attributes.h in an effort to help the encoding/decoding to stay in sync with the Attribute bitcode definitions. llvm-svn: 157581
* Random BitcodeReader cleanups.Benjamin Kramer2012-05-281-49/+25
| | | | llvm-svn: 157577
* PR1255: Case RangesStepan Dyatkovskiy2012-05-281-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now? 1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst. 2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case. 3. IntItem can be easyly easily replaced with APInt. 4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes. Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code ConstantInt *V = ...; if (V->getValue().ugt(AnotherV->getValue()) { ... } will look awful. Much more better this way: IntItem V = ConstantIntVal->getValue(); if (AnotherV < V) { } Of course any reviews are welcome. P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks). Since in future these classes will founded on APInt, it will possible to use them in more generic ways. llvm-svn: 157576
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-281-1/+1
| | | | llvm-svn: 157556
* revert r156383: removal of TYPE_CODE_FUNCTION_OLDNuno Lopes2012-05-231-0/+20
| | | | | | Apparently LLVM only stopped emitting this after LLVM 3.0 llvm-svn: 157325
* SwitchInst cosmetics: renamed "Hash" method to "hash"Stepan Dyatkovskiy2012-05-141-1/+1
| | | | llvm-svn: 156757
* Recommited r156374 with critical fixes in BitcodeReader/Writer:Stepan Dyatkovskiy2012-05-121-7/+75
| | | | | | | | Ordinary patch for PR1255. Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object. Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported. llvm-svn: 156704
* remove autoupgrade code for old function attributes format.Nuno Lopes2012-05-081-31/+1
| | | | | | I still left another fixme regarding alignment, because I'm unsure how to remove that code without breaking things llvm-svn: 156387
* remove TYPE_CODE_FUNCTION_OLD type code. it is no longer in use and it was ↵Nuno Lopes2012-05-081-20/+0
| | | | | | marked for removal in 3.0 llvm-svn: 156383
* Rejected r156374: Ordinary PR1255 patch. Due to clang-x86_64-debian-fnt ↵Stepan Dyatkovskiy2012-05-081-75/+7
| | | | | | buildbot failure. llvm-svn: 156377
* Ordinary patch for PR1255.Stepan Dyatkovskiy2012-05-081-7/+75
| | | | | | | Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object. Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported. llvm-svn: 156374
* Fix PR12080 by ensuring that MaterializeModule actually reads all the bitcodeDerek Schuff2012-02-292-4/+12
| | | | | | in the streaming case. llvm-svn: 151676
* Enable streaming of bitcodeDerek Schuff2012-02-062-72/+162
| | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
* [unwind removal] Remove the 'unwind' instruction parsing bits.Bill Wendling2012-02-061-4/+0
| | | | llvm-svn: 149897
* Test commit; also removes some trailing whitespaceDerek Schuff2012-02-061-3/+3
| | | | llvm-svn: 149887
* Improve the bitcode reader's handling of constant strings to useChris Lattner2012-02-051-22/+6
| | | | | | | ConstantDataArray::getString direction, instead of "boxing" each byte into a ConstantInt and using ConstantArray::get. llvm-svn: 149805
* Add bitcode reader and writer support for ConstantDataAggregate, whichChris Lattner2012-01-301-0/+59
| | | | | | should be feature complete now. Lets see if it works. llvm-svn: 149215
* smallvectorize.Chris Lattner2012-01-271-6/+6
| | | | llvm-svn: 149117
* Extend Attributes to 64 bitsKostya Serebryany2012-01-201-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Materialize functions whose basic blocks are used by global variables. FixesRafael Espindola2012-01-022-1/+13
| | | | | | PR11677. llvm-svn: 147425
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-171-1/+6
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Begin adding experimental support for preserving use-list ordering of bitcodeChad Rosier2011-12-072-0/+53
| | | | | | | | | | 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. llvm-svn: 146078
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-5/+0
| | | | llvm-svn: 145420
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-3/+0
| | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? llvm-svn: 145169
OpenPOWER on IntegriCloud