summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
...
* convert the bitstream reader itself and the IR .bc file parser to use the ↵Chris Lattner2013-01-202-248/+214
| | | | | | | | new advance() APIs, simplifying things and making a bunch of details more private to BitstreamCursor. llvm-svn: 172947
* stringref'ize readRecord and properly capitalize it. Add a compatibility ↵Chris Lattner2013-01-201-6/+7
| | | | | | | | method to easy the transition. llvm-svn: 172940
* move some private methods out of line, add a skipRecord() method.Chris Lattner2013-01-201-3/+111
| | | | llvm-svn: 172931
* Add a new BitstreamEntry concept, and add two helper methods for walkingChris Lattner2013-01-192-2/+2
| | | | | | | | through a BitstreamCursor that produce it: advance() and advanceSkippingSubblocks(), representing the two most common ways clients want to walk through bitcode. llvm-svn: 172919
* BitstreamReader hasn't aged well. It's been hacked on by various people andChris Lattner2013-01-193-4/+254
| | | | | | | has past the point of making sense. Lets tidy things up: first step, moving a ton of big functions out of line. llvm-svn: 172904
* Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test ↵Bill Wendling2013-01-091-1/+1
| | | | | | hangings. llvm-svn: 172020
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-026-24/+24
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* s/Raw/getBitMask/g to be more in line with current naming conventions. This ↵Bill Wendling2012-12-301-1/+1
| | | | | | method won't be sticking around. llvm-svn: 171244
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-194-8/+8
| | | | | | single attribute in the future. llvm-svn: 170502
* Reorganize FastMathFlags to be a wrapper around unsigned, and streamline ↵Michael Ilseman2012-12-092-15/+15
| | | | | | some interfaces. llvm-svn: 169712
* Have the bitcode reader/writer just use FPMathOperator's fast math enum directlyMichael Ilseman2012-12-092-10/+10
| | | | llvm-svn: 169710
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-075-15/+15
| | | | | | in the near future. llvm-svn: 169651
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-4/+4
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Minor tweaking to SmallVector static size.Michael Ilseman2012-12-031-1/+1
| | | | llvm-svn: 169176
* Since this SmallVector immediately grows on the next line, don't waste stack ↵Michael Ilseman2012-12-031-1/+1
| | | | | | space. SmallVector is still needed due to existing APIs growing their arguments llvm-svn: 169157
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-034-12/+12
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-281-0/+8
| | | | | | | This is for backwards compatibility for pre-3.x bc files. The code reads the code, but does nothing with it. llvm-svn: 168779
* Remove the dependent libraries feature.Bill Wendling2012-11-272-11/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Code pretificationJoe Abbey2012-11-271-8/+8
| | | | llvm-svn: 168661
* Fast-math flags for the bitcodeMichael Ilseman2012-11-272-0/+27
| | | | | | 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-258-68/+67
| | | | | | | | - 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-152-75/+75
| | | | llvm-svn: 168103
* Relax the restrictions on vector of pointer types, and vector getelementptr.Duncan Sands2012-11-131-5/+6
| | | | | | | | | | | | | | | Previously in a vector of pointers, the pointer couldn't be any pointer type, it had to be a pointer to an integer or floating point type. This is a hassle for dragonegg because the GCC vectorizer happily produces vectors of pointers where the pointer is a pointer to a struct or whatever. Vector getelementptr was restricted to just one index, but now that vectors of pointers can have any pointer type it is more natural to allow arbitrary vector getelementptrs. There is however the issue of struct GEPs, where if each lane chose different struct fields then from that point on each lane will be working down into unrelated types. This seems like too much pain for too little gain, so when you have a vector struct index all the elements are required to be the same. llvm-svn: 167828
* 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-112-2/+2
| | | | llvm-svn: 165753
* Change encoding of instruction operands in bitcode binaries to be relativeJan Wen Voung2012-10-113-90/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-2/+2
| | | | | | 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-152-4/+4
| | | | 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-052-2/+28
| | | | | | Reader/Writer. llvm-svn: 163185
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-172-2/+2
| | | | | | | | | | | | | | | | | | | | 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-232-5/+27
| | | | | | | | | | | | | | | 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
* Optimized usage of new SwitchInst case values (IntegersSubset type) in ↵Stepan Dyatkovskiy2012-06-231-12/+31
| | | | | | | | Local.cpp, Execution.cpp and BitcodeWriter.cpp. I got about 1% of compile-time improvement on my machines (Ubuntu 11.10 i386 and Ubuntu 12.04 x64). llvm-svn: 159076
* PR1255: case ranges.Stepan Dyatkovskiy2012-06-021-6/+5
| | | | | | IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()" llvm-svn: 157884
* ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy2012-05-292-7/+7
| | | | | | 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-282-26/+3
| | | | | | | | | 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-282-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud