summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Debug Info: clean up.Manman Ren2013-07-231-18/+6
| | | | llvm-svn: 187002
* Remove unused function.Eric Christopher2013-07-231-7/+0
| | | | llvm-svn: 187001
* Debug Info: code cleanup, use getNodeField if possible.Manman Ren2013-07-231-28/+15
| | | | | | | Use getNodeField to access a field as a MDNode. No functionality change. llvm-svn: 186985
* DebugInfo Verifier: verify the actual type.Manman Ren2013-07-231-0/+10
| | | | llvm-svn: 186972
* Debug Info Finder: use processDeclare and processValue to list debug infoManman Ren2013-07-232-1/+36
| | | | | | | | | | | MDNodes used by DbgDeclareInst and DbgValueInst. Another 16 testing cases failed and they are disabled with -disable-debug-info-verifier. A total of 34 cases are disabled with -disable-debug-info-verifier and will be corrected. llvm-svn: 186902
* Debug Info Finder: add processScope to actually handle the Scope.Manman Ren2013-07-221-3/+23
| | | | | | Instead of just adding the scope to the list, we actually handle the scope. llvm-svn: 186867
* Disallow global aliases to bitcast between address spacesMatt Arsenault2013-07-201-4/+15
| | | | llvm-svn: 186767
* Remove trailing whitespace, fix file path in commentMatt Arsenault2013-07-202-38/+38
| | | | llvm-svn: 186766
* Debug Info Verifier: simplify DIxxx::VerifyManman Ren2013-07-202-28/+17
| | | | | | | | Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes that should be a DIType and we will call Verify on those lists. llvm-svn: 186737
* s/compiler_used/compiler.used/.Rafael Espindola2013-07-191-1/+1
| | | | | | | We were incorrectly using compiler_used instead of compiler.used. Unfortunately the passes using the broken name had tests also using the broken name. llvm-svn: 186705
* Remove DIBuilder cache of variable TheCU and change the fewEric Christopher2013-07-191-14/+18
| | | | | | | uses that wanted it. Also change the interface for createCompileUnit to compensate. Fix comments that refer to TheCU as well. llvm-svn: 186637
* Debug Info: enable verifying by default and disable testing cases that fail.Manman Ren2013-07-192-0/+34
| | | | | | | | | | | | | | | | | | | 1> Use DebugInfoFinder to find debug info MDNodes. 2> Add disable-debug-info-verifier to disable verifying debug info. 3> Disable verifying for testing cases that fail (will update the testing cases later on). 4> MDNodes generated by clang can have empty filename for TAG_inheritance and TAG_friend, so DIType::Verify is modified accordingly. Note that DebugInfoFinder does not list all debug info MDNode. For example, clang can generate: metadata !{i32 786468}, which will fail to verify. This MDNode is used by debug info but not included in DebugInfoFinder. This MDNode is generated as a temporary node in DIBuilder::createFunction Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) }; MDNode::getTemporary(VMContext, TElts) llvm-svn: 186634
* Revert "Remove DIBuilder cache of variable TheCU and change the few"Eric Christopher2013-07-181-18/+14
| | | | | | This reverts commit r186599 as I didn't want to commit this yet. llvm-svn: 186601
* Remove DIBuilder cache of variable TheCU and change the fewEric Christopher2013-07-181-14/+18
| | | | | | | uses that wanted it. Also change the interface for createCompileUnit to compensate. Fix comments that refer to TheCU as well. llvm-svn: 186599
* Add getModuleFlag(StringRef Key) to query a module flag given Key.Manman Ren2013-07-161-0/+13
| | | | | | No functionality change. llvm-svn: 186470
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-141-2/+2
| | | | | | size. llvm-svn: 186274
* Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.Charles Davis2013-07-121-0/+2
| | | | | | | | | | | | | | | Summary: This patch adds explicit calling convention types for the Win64 and System V/x86-64 ABIs. This allows code to override the default, and use the Win64 convention on a target that wants to use SysV (and vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU attributes. Reviewers: CC: llvm-svn: 186144
* Reduce the number of indirections in the attributes implementation.Benjamin Kramer2013-07-112-178/+131
| | | | | | | | | | | - Coallocate entires for AttributeSetImpls and Nodes after the class itself. - Remove mutable iterators from immutable classes. - Remove unused context field from AttributeImpl. - Derive Enum/Align/String attribute implementations from AttributeImpl instead of having a whole new inheritance tree for them. - Derive AlignAttributeImpl from EnumAttributeImpl. llvm-svn: 186075
* Don't assert if we can't constant fold extract/insertvalueHal Finkel2013-07-101-8/+21
| | | | | | | | | | | | | | | A non-constant-foldable static initializer expression containing insertvalue or extractvalue had been causing an assert: Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be folded!"' failed. Now we report a more-sensible "Unsupported expression in static initializer" error instead. Fixes PR15417. llvm-svn: 186044
* Revert "DebugInfo: remove unused helper function getDICompositeType."Eric Christopher2013-07-091-0/+11
| | | | | | | This reverts commit r185876 as the functions appear to still be used by dragonegg. llvm-svn: 185890
* DebugInfo: remove unused helper function getDICompositeType.Manman Ren2013-07-081-11/+0
| | | | llvm-svn: 185876
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-063-9/+24
| | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
* DebugInfo: Consider global variables without locations to be validDavid Blaikie2013-07-041-3/+0
| | | | | | | | | | | | | | | | | We were being a bit too aggresive here in classifying global variables with no global reference or constant value to be invalid - this would cause LLVM to not emit the DWARF description of the global variable if it had been optimized away, which isn't helpful for users who might benefit from the global variable's description even if there's no location information. This also fixes a crasher issue here that I was unable to reduce a test case for - involving a using decl (& subsequent DW_TAG_imported_declaration ) of such a global variable that, once optimized away, would crash when an attempt to emit the imported declaration was made. llvm-svn: 185675
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-042-8/+8
| | | | | | specifying the vector size. llvm-svn: 185606
* Use an RWMutex instead of a Mutex in PassRegistry.Chad Rosier2013-07-031-10/+11
| | | | | | Patch by Alex Crichton <alex@crichton.co>. Approved by Chris Lattner. llvm-svn: 185566
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-6/+6
| | | | | | specifying the vector size. llvm-svn: 185540
* Debug Info: cleanupManman Ren2013-07-021-4/+6
| | | | llvm-svn: 185456
* IRVerifier: Correctly check attribute typesTobias Grosser2013-07-021-1/+2
| | | | | | | | | | | Add missing parenthesis such that all and not only the very first attribute is checked. Testing this piece of code is not possible with an LLVM-IR test file, as the LLVM-IR parser has a similar check such that the wrong IR does not even arrive at the verifier. llvm-svn: 185408
* Debug Info: clean up usage of Verify.Manman Ren2013-07-011-16/+18
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185383
* Debug Info: Scope of a DebugLoc should not be null.Manman Ren2013-07-011-6/+3
| | | | | | No functionality change. Remove handling for the null case. llvm-svn: 185354
* ConstantFold: Check that truncating the other side is safe under a sext when ↵Benjamin Kramer2013-06-301-2/+2
| | | | | | | | trying to remove a sext from a compare. Fixes PR16462. llvm-svn: 185284
* Debug Info: clean up usage of Verify.Manman Ren2013-06-292-5/+11
| | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. llvm-svn: 185249
* Fix extra whitespace / formattingMatt Arsenault2013-06-281-3/+0
| | | | llvm-svn: 185238
* Rename DIBuilder::createNullPtrType to createUnspecifiedType and introducePeter Collingbourne2013-06-271-4/+9
| | | | | | | | | a zero-argument createNullPtrType function for creating the canonical nullptr type. Differential Revision: http://llvm-reviews.chandlerc.com/D1050 llvm-svn: 185114
* Added support for the Builtin attribute.Michael Gottesman2013-06-273-2/+21
| | | | | | | | The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin, rdar://problem/13727199 llvm-svn: 185049
* s/C++0x/C++11/Adrian Prantl2013-06-251-1/+1
| | | | llvm-svn: 184892
* The GCDA 402 format won't have a second checksum either.Bill Wendling2013-06-251-1/+1
| | | | llvm-svn: 184864
* typo.Adrian Prantl2013-06-241-1/+1
| | | | llvm-svn: 184783
* DebugInfo: DIBuilder changes to match DIEnumerator changes in r184694David Blaikie2013-06-241-1/+1
| | | | | | | | Representing enumerators by int64 instead of uint64 for now. At some point we need to address the underlying issue of representation depending on the specific enumeration. llvm-svn: 184761
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-222-7/+40
| | | | | | and parameter packs llvm-svn: 184643
* DebugInfo: When asm printing include a '[def]' tag for tag decls that are ↵David Blaikie2013-06-211-1/+6
| | | | | | | | | definitions (& rename the 'fwd' tag to 'decl' for clarity) This change is version locked with a change in Clang, so expect some transient buildbot fallout. llvm-svn: 184525
* [APFloat] Converted all references to APFloat::isNormal => ↵Michael Gottesman2013-06-191-1/+1
| | | | | | | | APFloat::isFiniteNonZero. Turns out all the references were in llvm and not in clang. llvm-svn: 184356
* We want a string representation of the attribute, not the kind as a string.Bill Wendling2013-06-181-2/+2
| | | | llvm-svn: 184239
* Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddressesDerek Schuff2013-06-131-1/+1
| | | | | | | | | | | | | | | This pass was assuming that if hasAddressTaken() returns false for a function, the function's only uses are call sites. That's not true because there can be references by BlockAddresses too. Fix the pass to handle this case. Fix BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type to be changed by RAUW'ing the function with a bitcast of the recreated function. Patch by Mark Seaborn. llvm-svn: 183933
* Require members of llvm.used to be named.Rafael Espindola2013-06-111-0/+1
| | | | | | | | The effect of llvm.used is to introduce an invisible reference, so this seems a reasonable restriction. It will be used to provide an easy ordering of the entries in llvm.used. llvm-svn: 183743
* DIBuilder: No functionality change.Manman Ren2013-06-071-23/+26
| | | | | | Use the correct DIType when creating types in DIBuilder. llvm-svn: 183543
* DIBuilder: No functionality change.Manman Ren2013-06-071-3/+3
| | | | | | Use the correct DIType when creating vector types. llvm-svn: 183484
* Move getRealLinkageName to a common place and remove all the duplicates of it.Benjamin Kramer2013-06-011-25/+16
| | | | | | Also simplify code a bit while there. No functionality change. llvm-svn: 183076
* Move object construction into [] so the temporary can be moved.Benjamin Kramer2013-06-011-5/+3
| | | | | | No functionality change. llvm-svn: 183075
* Simplify logic by using the appropriate functions.Adrian Prantl2013-05-291-2/+1
| | | | llvm-svn: 182869
OpenPOWER on IntegriCloud