summaryrefslogtreecommitdiff
path: root/lib/VMCore
AgeCommit message (Collapse)AuthorFilesLines
2013-01-02Rename VMCore directory to IR.Chandler Carruth48-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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31Add some comparison operators to compare the Attribute object with the ↵Bill Wendling1-2/+10
AttrKind value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171294 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31Remove the getAttributesAtIndex and getNumAttrs methods in favor of using ↵Bill Wendling1-13/+3
the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171271 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Use the predicate methods off of AttributeSet instead of Attribute.Bill Wendling3-23/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171257 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Remove Function::getParamAttributes and use the AttributeSet accessor ↵Bill Wendling2-14/+14
methods instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling4-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171253 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30s/hasAttribute/contains/g to be more consistent with other method names.Bill Wendling1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Add a few more c'tors:Bill Wendling2-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" } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Add a few (as yet unused) query methods to determine if the attribute that'sBill Wendling2-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30Uniquify the AttributeImpl based on the Constant pointer, since those areBill Wendling2-5/+3
already uniquified. Note: This will be expanded in the future to add more than just one pointer value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30s/Raw/getBitMask/g to be more in line with current naming conventions. This ↵Bill Wendling3-19/+20
method won't be sticking around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29Use a 'Constant' object instead of a bit field to store the attribute data.Bill Wendling2-8/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171221 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29Use the accessor method instead of the raw ivar to get the bits.Bill Wendling1-5/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171220 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-2680 columns. No functionality change.Nick Lewycky1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171120 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-25Rename LLVMContext diagnostic handler types and functions.Bob Wilson3-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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171047 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-24Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>Bob Wilson1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171041 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-24Added 6 more value types: v32i1, v64i1, v32i16, v32i8, v64i8, v8f64Elena Demikhovsky1-0/+12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-22Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of ↵Bill Wendling2-11/+11
attribute instead of the value of the attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170972 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Some random comment, naming, and format changes.Bill Wendling2-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170767 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Add a new attribute, 'noduplicate'. If a function contains a noduplicate ↵James Molloy1-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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170704 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Don't use isa<CallInst>(this) in the constructor for CallInst's base class.Richard Smith1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170658 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Don't use -1 as a value of an unsigned 7-bit enumeration; that has undefinedRichard Smith1-2/+1
behavior and violates the !range constraints we put on loads of this enum. Found by clang -fsanitize=enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170653 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20s/AttributesImpl/AttributeImpl/g This is going to apply to Attribute, not ↵Bill Wendling4-22/+22
Attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170631 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Add a context so that once we uniquify strings we can access them easily.Bill Wendling2-3/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170615 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Refactor isIntrinsic() to be quicker, and change classof() (and thus, ↵Michael Ilseman1-5/+1
isa<IntrinsicInst>()) to use it. This decreases the number of occurrences of the slow-path string matching performed by getIntrinsicID(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170602 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19s/AttributeListImpl/AttributeSetImpl/g to match the namechange of AttributeList.Bill Wendling4-12/+12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170600 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Change AsmOperandInfo::ConstraintVT to MVT, instead of EVT.Patrik Hagglund1-5/+22
Accordingly, add MVT::getVT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Inline hasFunctionOnlyAttrs into its only use.Bill Wendling1-1/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Inline the only use of the hasParameterOnlyAttrs method.Bill Wendling1-1/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170517 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Inline the 'hasIncompatibleWithVarArgsAttrs' method into its only uses. And ↵Bill Wendling1-1/+1
some minor comment reformatting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling7-203/+203
single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-17Removed trailing whitespaceMichael Ilseman1-22/+22
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170367 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12Kerning.Bill Wendling1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-11Holding my nose and moving the accumulation routine to GEPOperatorChandler Carruth1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169853 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-11Hoist the GEP constant address offset computation to a common home onChandler Carruth1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169852 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-07s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling7-46/+46
in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-05Fix name. The array is unboundED.Bill Wendling1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169428 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-05- Added calls to doInitialization/doFinalization to immutable passesPedro Artigas1-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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169391 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Use the 'count' attribute to calculate the upper bound of an array.Bill Wendling2-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169312 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2-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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Add a 'count' field to the DWARF subrange.Bill Wendling1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03moves doInitialization and doFinalization to the Pass class and removes some ↵Pedro Artigas2-20/+6
unreachable code in MachineModuleInfo reviewed by Evan Cheng <evan.cheng@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169164 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03Add 'getInt64Field()' method to get the signed integer instead of unsigned.Bill Wendling1-0/+12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169145 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03Revert r169039, "Aggregate pass execution time report by pass ID instead of ↵Jakob Stoklund Olesen1-3/+3
pass instance." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169134 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth32-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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01Revert previous check in r168581, r169079 as they are still in code review ↵Zhou Sheng1-12/+0
status. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169083 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().NAKAMURA Takumi1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169074 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30Aggregate pass execution time report by pass ID instead of pass instance.Jakob Stoklund Olesen1-3/+3
This avoids unidentified duplicates in the pass execution time report when a pass runs more than once in the pass manager pipeline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169039 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30More strict error checking in parseSpecifier + simplified code.Patrik Hagglund1-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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168991 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168972 91177308-0d34-0410-b5e6-96231b3b80d8