summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Rename VMCore directory to IR.Chandler Carruth2013-01-0248-30206/+0
| | | | | | | | | | | | | | | | | | Aside from moving the actual files, this patch only updates the build system and the source file comments under lib/... that are relevant. I'll be updating other docs and other files in smaller subsequnet commits. While I've tried to test this, but it is entirely possible that there will still be some build system fallout. Also, note that I've not changed the library name itself: libLLVMCore.a is still the library name. I'd be interested in others' opinions about whether we should rename this as well (I think we should, just not sure what it might break) llvm-svn: 171359
* Add some comparison operators to compare the Attribute object with the ↵Bill Wendling2012-12-311-2/+10
| | | | | | AttrKind value. llvm-svn: 171294
* Remove the getAttributesAtIndex and getNumAttrs methods in favor of using ↵Bill Wendling2012-12-311-13/+3
| | | | | | the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes. llvm-svn: 171271
* Use the predicate methods off of AttributeSet instead of Attribute.Bill Wendling2012-12-303-23/+19
| | | | llvm-svn: 171257
* Remove Function::getParamAttributes and use the AttributeSet accessor ↵Bill Wendling2012-12-302-14/+14
| | | | | | methods instead. llvm-svn: 171255
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-304-10/+29
| | | | | | | | | directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171253
* s/hasAttribute/contains/g to be more consistent with other method names.Bill Wendling2012-12-301-1/+1
| | | | llvm-svn: 171252
* Add a few more c'tors:Bill Wendling2012-12-302-5/+29
| | | | | | | | | | | | | | | * One that accepts a single Attribute::AttrKind. * One that accepts an Attribute::AttrKind plus a list of values. This is for attributes defined like this: #1 = attributes { align = 4 } * One that accepts a string, for target-specific attributes like this: #2 = attributes { "cpu=cortex-a8" } llvm-svn: 171249
* Add a few (as yet unused) query methods to determine if the attribute that'sBill Wendling2012-12-302-0/+31
| | | | | | | stored here is of a certain kind. This is in preparation for when an Attribute object represents a single attribute, instead of a bitmask of attributes. llvm-svn: 171247
* Uniquify the AttributeImpl based on the Constant pointer, since those areBill Wendling2012-12-302-5/+3
| | | | | | | | | already uniquified. Note: This will be expanded in the future to add more than just one pointer value. llvm-svn: 171245
* s/Raw/getBitMask/g to be more in line with current naming conventions. This ↵Bill Wendling2012-12-303-19/+20
| | | | | | method won't be sticking around. llvm-svn: 171244
* Use a 'Constant' object instead of a bit field to store the attribute data.Bill Wendling2012-12-292-8/+19
| | | | llvm-svn: 171221
* Use the accessor method instead of the raw ivar to get the bits.Bill Wendling2012-12-291-5/+5
| | | | llvm-svn: 171220
* 80 columns. No functionality change.Nick Lewycky2012-12-261-1/+1
| | | | llvm-svn: 171120
* Rename LLVMContext diagnostic handler types and functions.Bob Wilson2012-12-253-22/+20
| | | | | | | | | These are now generally used for all diagnostics from the backend, not just for inline assembly, so this drops the "InlineAsm" from the names. No functional change. (I've left aliases for the old names but only for long enough to let me switch over clang to use the new ones.) llvm-svn: 171047
* Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>Bob Wilson2012-12-241-1/+28
| | | | | | | | | When the backend is used from clang, it should produce proper diagnostics instead of just printing messages to errs(). Other clients may also want to register their own error handlers with the LLVMContext, and the same handler should work for warnings in the same way as the existing emitError methods. llvm-svn: 171041
* Added 6 more value types: v32i1, v64i1, v32i16, v32i8, v64i8, v8f64Elena Demikhovsky2012-12-241-0/+12
| | | | llvm-svn: 171026
* Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of ↵Bill Wendling2012-12-222-11/+11
| | | | | | attribute instead of the value of the attribute. llvm-svn: 170972
* Some random comment, naming, and format changes.Bill Wendling2012-12-202-12/+19
| | | | | | | Rename the AttributeImpl* from Attrs to pImpl to be consistent with other code. Add comments where none were before. Or doxygen-ify other comments. llvm-svn: 170767
* Add a new attribute, 'noduplicate'. If a function contains a noduplicate ↵James Molloy2012-12-201-0/+3
| | | | | | | | call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage). llvm-svn: 170704
* Don't use isa<CallInst>(this) in the constructor for CallInst's base class.Richard Smith2012-12-201-2/+5
| | | | | | | | This has undefined behavior, because the classof implementation attempts to access parts of the not-yet-constructed derived class. Found by clang -fsanitize=vptr. llvm-svn: 170658
* Don't use -1 as a value of an unsigned 7-bit enumeration; that has undefinedRichard Smith2012-12-201-2/+1
| | | | | | | behavior and violates the !range constraints we put on loads of this enum. Found by clang -fsanitize=enum. llvm-svn: 170653
* s/AttributesImpl/AttributeImpl/g This is going to apply to Attribute, not ↵Bill Wendling2012-12-204-22/+22
| | | | | | Attributes. llvm-svn: 170631
* Add a context so that once we uniquify strings we can access them easily.Bill Wendling2012-12-192-3/+6
| | | | llvm-svn: 170615
* Refactor isIntrinsic() to be quicker, and change classof() (and thus, ↵Michael Ilseman2012-12-191-5/+1
| | | | | | isa<IntrinsicInst>()) to use it. This decreases the number of occurrences of the slow-path string matching performed by getIntrinsicID(). llvm-svn: 170602
* s/AttributeListImpl/AttributeSetImpl/g to match the namechange of AttributeList.Bill Wendling2012-12-194-12/+12
| | | | llvm-svn: 170600
* Change AsmOperandInfo::ConstraintVT to MVT, instead of EVT.Patrik Hagglund2012-12-191-5/+22
| | | | | | Accordingly, add MVT::getVT. llvm-svn: 170550
* Inline hasFunctionOnlyAttrs into its only use.Bill Wendling2012-12-191-1/+19
| | | | llvm-svn: 170518
* Inline the only use of the hasParameterOnlyAttrs method.Bill Wendling2012-12-191-1/+4
| | | | llvm-svn: 170517
* Inline the 'hasIncompatibleWithVarArgsAttrs' method into its only uses. And ↵Bill Wendling2012-12-191-1/+1
| | | | | | some minor comment reformatting. llvm-svn: 170516
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-197-203/+203
| | | | | | single attribute in the future. llvm-svn: 170502
* Removed trailing whitespaceMichael Ilseman2012-12-171-22/+22
| | | | llvm-svn: 170367
* Kerning.Bill Wendling2012-12-121-1/+1
| | | | llvm-svn: 170002
* Holding my nose and moving the accumulation routine to GEPOperatorChandler Carruth2012-12-111-28/+2
| | | | | | | | | | | | | | | | | instead of the instruction. I've left a forwarding wrapper for the instruction so users with the instruction don't need to create a GEPOperator themselves. This lets us remove the copy of this code in instsimplify. I've looked at most of the other copies of similar code, and this is the only one I've found that is actually exactly the same. The one in InlineCost is very close, but it requires re-mapping non-constant indices through the cost analysis value simplification map. I could add direct support for this to the generic routine, but it seems overly specific. llvm-svn: 169853
* Hoist the GEP constant address offset computation to a common home onChandler Carruth2012-12-111-0/+33
| | | | | | | | | | | the GEP instruction class. This is part of the continued refactoring and cleaning of the infrastructure used by SROA. This particular operation is also done in a few other places which I'll try to refactor to share this implementation. llvm-svn: 169852
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-077-46/+46
| | | | | | in the near future. llvm-svn: 169651
* Fix name. The array is unboundED.Bill Wendling2012-12-051-1/+1
| | | | llvm-svn: 169428
* - Added calls to doInitialization/doFinalization to immutable passesPedro Artigas2012-12-051-5/+29
| | | | | | | | | - fixed ordering of calls to doFinalization to be the reverse of the pass run order due to potential dependencies - fixed machine module info to operate in the doInitialization/doFinalization model, also fixes some FIXMEs reviewed by Evan Cheng <evan.cheng@apple.com> llvm-svn: 169391
* Use the 'count' attribute to calculate the upper bound of an array.Bill Wendling2012-12-042-4/+6
| | | | | | | | | The count attribute is more accurate with regards to the size of an array. It also obviates the upper bound attribute in the subrange. We can also better handle an unbound array by setting the count to -1 instead of the lower bound to 1 and upper bound to 0. llvm-svn: 169312
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-042-7/+7
| | | | | | | | | | 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
* Add a 'count' field to the DWARF subrange.Bill Wendling2012-12-041-2/+4
| | | | | | | | | The count field is necessary because there isn't a difference between the 'lo' and 'hi' attributes for a one-element array and a zero-element array. When the count is '0', we know that this is a zero-element array. When it's >=1, then it's a normal constant sized array. When it's -1, then the array is unbounded. llvm-svn: 169218
* moves doInitialization and doFinalization to the Pass class and removes some ↵Pedro Artigas2012-12-032-20/+6
| | | | | | | | unreachable code in MachineModuleInfo reviewed by Evan Cheng <evan.cheng@apple.com> llvm-svn: 169164
* Add 'getInt64Field()' method to get the signed integer instead of unsigned.Bill Wendling2012-12-031-0/+12
| | | | llvm-svn: 169145
* Revert r169039, "Aggregate pass execution time report by pass ID instead of ↵Jakob Stoklund Olesen2012-12-031-3/+3
| | | | | | pass instance." llvm-svn: 169134
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-0332-109/+112
| | | | | | | | | | | | | | | | | 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
* Revert previous check in r168581, r169079 as they are still in code review ↵Zhou Sheng2012-12-011-12/+0
| | | | | | status. llvm-svn: 169083
* VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().NAKAMURA Takumi2012-12-011-2/+3
| | | | | | | 2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}". I am not sure it would be ill-formed or not. llvm-svn: 169074
* Aggregate pass execution time report by pass ID instead of pass instance.Jakob Stoklund Olesen2012-11-301-3/+3
| | | | | | | This avoids unidentified duplicates in the pass execution time report when a pass runs more than once in the pass manager pipeline. llvm-svn: 169039
* More strict error checking in parseSpecifier + simplified code.Patrik Hagglund2012-11-301-79/+70
| | | | | | | | | | | For example, don't allow empty strings to be passed to getInt. Move asserts inside parseSpecifier. (One day we may want to pass parse error messages to the user - from LLParser - instead of using asserts, but keep the code simple until then. There have been an attempt to do this. See r142288, which got reverted, and r142605.) llvm-svn: 168991
* Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth2012-11-301-1/+1
| | | | | | | | | | | | depends on the IR infrastructure, there is no sense in it being off in Support land. This is in preparation to start working to expand InstVisitor into more special-purpose visitors that are still generic and can be re-used across different passes. The expansion will go into the Analylis tree though as nothing in VMCore needs it. llvm-svn: 168972
OpenPOWER on IntegriCloud