summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Add a AttributeSetImpl::dump function.Peter Collingbourne2013-08-022-0/+6
| | | | | | | This is for the benefit of those of us with inferior debuggers which do not permit member function calls on value types. llvm-svn: 187685
* Make one of the AttributeSet ctors maintain the invariant that thePeter Collingbourne2013-08-022-2/+29
| | | | | | | | attribute list is ordered by index. Differential Revision: http://llvm-reviews.chandlerc.com/D1265 llvm-svn: 187682
* Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached toEric Christopher2013-08-022-7/+16
| | | | | | | | instructions." in an attempt to bring back some bots. This reverts commit r187609. llvm-svn: 187638
* Debug Info Finder|Verifier: handle DbgLoc attached to instructions.Manman Ren2013-08-012-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. llvm-svn: 187609
* Reject bitcasts between address spaces with different sizesMatt Arsenault2013-07-311-20/+104
| | | | llvm-svn: 187506
* Add parentheses to silence gcc warning.Richard Trieu2013-07-311-4/+4
| | | | llvm-svn: 187482
* Fix ptr vector inconsistency in CreatePointerCastMatt Arsenault2013-07-311-5/+13
| | | | | | | | One form would accept a vector of pointers, and the other did not. Make both accept vectors of pointers, and add an assertion for the number of elements. llvm-svn: 187464
* Respect address space sizes in isEliminableCastPair.Matt Arsenault2013-07-302-14/+52
| | | | | | | This avoids constant folding bitcast/ptrtoint/inttoptr combinations that have illegal bitcasts between differently sized address spaces. llvm-svn: 187455
* Revert "Remove isCastable since nothing uses it now"Matt Arsenault2013-07-301-0/+63
| | | | | | Apparently dragonegg uses it. llvm-svn: 187454
* Remove isCastable since nothing uses it nowMatt Arsenault2013-07-301-63/+0
| | | | llvm-svn: 187448
* Change behavior of calling bitcasted alias functions.Matt Arsenault2013-07-301-2/+44
| | | | | | | | It will now only convert the arguments / return value and call the underlying function if the types are able to be bitcasted. This avoids using fp<->int conversions that would occur before. llvm-svn: 187444
* Minor code simplification suggested by DuncanMatt Arsenault2013-07-271-2/+1
| | | | llvm-svn: 187309
* Debug Info Verifier: verify SPs in llvm.dbg.sp.Manman Ren2013-07-271-3/+9
| | | | | | | | Also always add DIType, DISubprogram and DIGlobalVariable to the list in DebugInfoFinder without checking them, so we can verify them later on. llvm-svn: 187285
* Use more parens to clarify assert.Eric Christopher2013-07-261-1/+1
| | | | llvm-svn: 187247
* Debug Info Verifier: enable verification of DICompileUnit.Manman Ren2013-07-261-3/+0
| | | | | | | | We used to call Verify before adding DICompileUnit to the list, and now we remove the check and always add DICompileUnit to the list in DebugInfoFinder, so we can verify them later on. llvm-svn: 187237
* Collapse conditional and add an assert for unhandled scope types.Eric Christopher2013-07-261-3/+1
| | | | llvm-svn: 187224
* Re-add DataLayout pointer size convenience functions.Matt Arsenault2013-07-261-0/+10
| | | | | | | | These were reverted in r167222 along with the rest of the last different address space pointer size attempt. These will be used in later commits. llvm-svn: 187223
* Add a way to get the context of any particular scope.Eric Christopher2013-07-261-0/+25
| | | | llvm-svn: 187212
* Debug Info: update comments and add a FIXME.Manman Ren2013-07-251-2/+5
| | | | llvm-svn: 187157
* Debug Info: improve the verifier to check field types.Manman Ren2013-07-251-0/+4
| | | | | | | Make sure the context field of DIType is MDNode. Fix testing cases to make them pass the verifier. llvm-svn: 187150
* Add a way to add a kind-value string pair to an attribute.Bill Wendling2013-07-251-0/+7
| | | | llvm-svn: 187138
* Debug Info: improve the verifier to check field types.Manman Ren2013-07-251-0/+45
| | | | | | | | Make sure the context and type fields are MDNodes. We will generate verification errors if those fields are non-empty strings. Fix testing cases to make them pass the verifier. llvm-svn: 187106
* Make these methods const correct.Rafael Espindola2013-07-251-2/+1
| | | | | | Thanks to Nick Lewycky for noticing it. llvm-svn: 187098
* Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.Bill Wendling2013-07-251-0/+4
| | | | | | | | There's no need to specify a flag to omit frame pointer elimination on non-leaf nodes...(Honestly, I can't parse that option out.) Use the function attribute stuff instead. llvm-svn: 187093
* Debug Info: improve the Finder.Manman Ren2013-07-241-0/+1
| | | | | | | Improve the Finder to handle context of a DIVariable used by DbgValueInst. Fix testing cases to make them pass the verifier. llvm-svn: 187052
* Replace with a "null" RAUW with an assert since we'd actually likeEric Christopher2013-07-241-8/+8
| | | | | | to assume we're replacing. Clarify comments. llvm-svn: 187018
* Remove dead code.Eric Christopher2013-07-241-5/+0
| | | | llvm-svn: 187017
* Remove unnecessary constructors as the default conversions will handleEric Christopher2013-07-241-18/+0
| | | | | | | all enumerated cases. Reformat the rest of the existing constructors to match. llvm-svn: 187015
* More constructor cleanup.Eric Christopher2013-07-241-6/+0
| | | | | | | Move to a single constructor with a default argument and avoid the check and nullification. llvm-svn: 187014
* Collapse logic and move and reword comment for clarity.Eric Christopher2013-07-241-3/+5
| | | | llvm-svn: 187013
* Add a fixme and reformat.Eric Christopher2013-07-241-4/+3
| | | | llvm-svn: 187012
* Debug Info: improve the Finder.Manman Ren2013-07-231-0/+9
| | | | | | | Improve the Finder to handle context of a DIVariable. If Scope is a DICompileUnit, add it to the list of CUs. llvm-svn: 187003
* 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
OpenPOWER on IntegriCloud