summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Adding DIImportedModules to DIScopes."David Blaikie2013-03-282-163/+62
| | | | | | | | | This reverts commit 342d92c7a0adeabc9ab00f3f0d88d739fe7da4c7. Turns out we're going with a different schema design to represent DW_TAG_imported_modules so we won't need this extra field. llvm-svn: 178215
* Fix commentDavid Blaikie2013-03-271-1/+1
| | | | llvm-svn: 178155
* Silence warning about mixing || in &&, fix up 80-cols.Benjamin Kramer2013-03-271-1/+3
| | | | llvm-svn: 178144
* Adding DIImportedModules to DIScopes.David Blaikie2013-03-272-62/+163
| | | | | | | | | | | | This is just the basic groundwork for supporting DW_TAG_imported_module but I wanted to commit this before pushing support further into Clang or LLVM so that this rather churny change is isolated from the rest of the work. The major churn here is obviously adding another field (within the common DIScope prefix) to all DIScopes (files, classes, namespaces, lexical scopes, etc). This should be the last big churny change needed for DW_TAG_imported_module/using directive support/PR14606. llvm-svn: 178099
* Make DIBuilder::createClassType more type safe by returning DICompositeType ↵David Blaikie2013-03-261-8/+10
| | | | | | rather than DIType llvm-svn: 178091
* DebugInfo: more support for mutating DICompositeType to reduce magic number ↵David Blaikie2013-03-261-1/+8
| | | | | | usage in Clang llvm-svn: 178090
* Debug Info: Provide a means to update the members of a composite typeDavid Blaikie2013-03-261-0/+11
| | | | | | | | This will be used to factor out some uses of magic number operand offsets inside Clang where these fields were updated in an effort to resolve forward declarations/circular references. llvm-svn: 178078
* Swap the DIFile in DILexicalBlockFile out for the raw name/directory pairDavid Blaikie2013-03-222-5/+1
| | | | | | This is the last change in transitioning all DIScopes to have a common prefix. llvm-svn: 177756
* reorder the fields in DILexicalBlockFile to match the common prefix for DIScopesDavid Blaikie2013-03-221-2/+2
| | | | llvm-svn: 177754
* Revert r177675. This is language-specific and shouldn't be in the API.Bill Wendling2013-03-221-7/+0
| | | | llvm-svn: 177748
* Refactor out the DIFile parameter to DILexicalBlock to refer to the raw ↵David Blaikie2013-03-222-5/+1
| | | | | | file/directory pair llvm-svn: 177742
* InstCombine: Improve the result bitvect type when folding (cmp pred (load ↵Arnaud A. de Grandmaison2013-03-221-0/+7
| | | | | | | | | | | | | | | (gep GV, i)) C) to a bit test. The original code used i32, and i64 if legal. This introduced unneeded casts when they aren't legal, or when the index variable i has another type. In order of preference: try to use i's type; use the smallest fitting legal type (using an added DataLayout method); default to i32. A testcase checks that this works when the index gep operand is i16. Patch by : Ahmed Bougacha <ahmed.bougacha@gmail.com> Reviewed by : Duncan llvm-svn: 177712
* Reorder the DIFile field in DILexicalBlock to become a prefix common with ↵David Blaikie2013-03-221-1/+1
| | | | | | other DIScopes llvm-svn: 177703
* Refactor the filename/directory information in DISubprogram to refer ↵David Blaikie2013-03-212-6/+2
| | | | | | directly to the pair rather than the DIFile. llvm-svn: 177677
* Add a query to tell if a landing pad has a catch-all.Bill Wendling2013-03-211-0/+7
| | | | llvm-svn: 177675
* Move the DIFile in DISubprogram to the beginning to be a common prefix along ↵David Blaikie2013-03-211-2/+2
| | | | | | with other DIScopes llvm-svn: 177674
* Remove unused field in DISubprogramDavid Blaikie2013-03-212-11/+13
| | | | llvm-svn: 177661
* Hoist the definition of getTypeSizeInBits to be inlinable and in theChandler Carruth2013-03-211-41/+0
| | | | | | | | | | | | | | | | | | header. This method is called in the hot path for *many* passes, SROA is what caught my interest. A common pattern is that which branch of the switch should be taken is known in the callsite and so it is a very good candidate for inlining and simplification. Moving it into the header allows the optimizer to fold a lot of boring, repeatitive code in callers of this routine. I'm seeing pretty significant speedups in parts of SROA and I suspect other passes will see similar speedups if they end up working with type sizes frequently. I've not seen any significant growth of the binaries as a consequence, but let me know if you see anything suspicious here. llvm-svn: 177632
* Debug info: refactor the first field of DICompileUnit to be a raw ↵David Blaikie2013-03-202-11/+12
| | | | | | | | file/directory pair This removes the DICompileUnit special case from DIScope. llvm-svn: 177610
* Use pre-inc, pre-dec when possible.Jakub Staszak2013-03-201-6/+6
| | | | | | They are generally faster (at least not slower) than post-inc, post-dec. llvm-svn: 177608
* Debug Info: Swap the 2nd and 3rd parameters to DICompileUnit to match the ↵David Blaikie2013-03-201-1/+1
| | | | | | common DIScope prefix llvm-svn: 177595
* Remove unused field in DICompileUnitDavid Blaikie2013-03-202-10/+9
| | | | llvm-svn: 177590
* minor code style cleanup.Chris Lattner2013-03-201-2/+2
| | | | llvm-svn: 177576
* Refactor file/directory path in namespace debug info to refer directly to ↵David Blaikie2013-03-202-5/+1
| | | | | | | | the pair rather than the DIFile (paired to a Clang test - excuse the buildbot skew/fallout) llvm-svn: 177566
* DIBuilder: allow linkage name to be specified for global variablesDavid Blaikie2013-03-201-4/+13
| | | | | | Patch by Kai Nacke (kai@redstar.de) llvm-svn: 177547
* Reorder the DIFile parameter in DINameSpaceDavid Blaikie2013-03-201-1/+1
| | | | | | | | Moving the DIFile parameter to immediately proceed the tag so that it will be a common prefix with other DIScopes (once the DIFile is replaced with the raw file/directory pair). llvm-svn: 177492
* Provide more details for DINameSpace debug info in the IR comment annotationsDavid Blaikie2013-03-201-0/+10
| | | | | | | Sorry for the version skew - I should've committed this before the corresponding Clang test case. llvm-svn: 177486
* Refactor the DIFile (2nd) parameter to DITypes to be an MDNode reference to ↵David Blaikie2013-03-202-14/+15
| | | | | | | | | a raw directory/file pair This makes DIType's first non-tag parameter the same as DIFile's, allowing them to both share the common implementation of getFilename/getDirectory in DIScope. llvm-svn: 177467
* Move the DIFile operand to DITypes from the 4th operand to the 2nd.David Blaikie2013-03-191-44/+21
| | | | | | | | This is another step along the way to making all DIScopes have a common prefix which can be added to in a general manner to support using directives (DW_TAG_imported_module). llvm-svn: 177462
* The testing to ensure a vector of zeros of type floating point isn't ↵David Tweed2013-03-191-6/+3
| | | | | | misclassified as negative zero can be simplified, as pointed out by Duncan Sands. llvm-svn: 177386
* The optimization a + (-0.0f) -> a was being misapplied to a + (+0.0f) in ↵David Tweed2013-03-181-0/+13
| | | | | | | | | | the vector case (because we weren't differntiating floating-point zeroinitializers from other zero-initializers) which was causing problems for code relying upon a + (+0.0f) to, eg, flush denormals to 0. Make the scalar and vector cases have the same behaviour. llvm-svn: 177279
* Fix the build broken in r177239David Blaikie2013-03-171-1/+1
| | | | | | Seems some accidental C++11 crept in there. Reported by the C++98 buildbots. llvm-svn: 177241
* Split out filename & directory from DIFile to start generalizing over DIScopesDavid Blaikie2013-03-172-16/+25
| | | | | | | | | | This is the first step to making all DIScopes have a common metadata prefix (so that things (using directives, for example) that can appear in any scope can be added to that common prefix). DIFile is itself a DIScope so the common prefix of all DIScopes cannot be a DIFile - instead it's the raw filename/directory name pair. llvm-svn: 177239
* Remove the unused 4th operand for DIFile debug info metadataDavid Blaikie2013-03-132-2/+1
| | | | llvm-svn: 176983
* Add some additonal attribute helper functions. Test will be on followReed Kotler2013-03-131-0/+7
| | | | | | up putback to clang for mips16. llvm-svn: 176968
* Refactor filename/directory in DICompileUnit into a DIFileDavid Blaikie2013-03-132-12/+10
| | | | | | | This is the next step towards making the metadata for DIScopes have a common prefix rather than having to delegate based on their tag type. llvm-svn: 176913
* Remove unused "isMain" field from DICompileUnitDavid Blaikie2013-03-122-11/+9
| | | | llvm-svn: 176910
* Update debug info test cases with empty SplitDebugFilename field.David Blaikie2013-03-121-4/+4
| | | | | | | | | | | | This could be 'null' or the empty string, DIDescriptor::getStringField coalesces the two cases anyway so it's just a matter of legible/efficient representation. The change in behavior of the DICompileUnit::get* functions could be subsumed by the full verification check - but ideally that should just be an assertion if we could front-load the actual debug info metadata failure paths. llvm-svn: 176907
* Add a doFinalization method to the DataLayout pass.Pete Cooper2013-03-121-0/+6
| | | | | | | | | | | | | | | This pass is meant to be immutable, however it holds mutable state to cache StructLayouts. This method will allow the pass manager to clear the mutable state between runs. Note that unfortunately it is still necessary to have the destructor, even though it does the same thing as doFinalization. This is because most TargetMachines embed a DataLayout on which doFinalization isn't run as its never added to the pass manager. I also didn't think it was necessary to complication things with a deInit method for which doFinalization and ~DataLayout both call as there's only one field of mutable state. If we had more fields to finalize i'd have added this. llvm-svn: 176877
* Remove support for versioned debug info.David Blaikie2013-03-112-95/+87
| | | | | | | | | | | | | | | | | | | | | | | | Versioned debug info support has been a burden to maintain & also compromised current debug info verification by causing test cases testing old debug info to remain rather than being updated to the latest. It also makes it hard to add or change the metadata schema by requiring various backwards-compatibility in the DI* hierarchy. So it's being removed in preparation for new changes to the schema to tidy up old/unnecessary fields and add new fields needed for new debug info (well, new to LLVM at least). The more surprising part of this is the changes to DI*::Verify - this became necessary due to the changes to AsmWriter. AsmWriter was relying on the version test to decide which bits of metadata were actually debug info when printing the comment annotations. Without the version information the tag numbers were too common & it would print debug info on random metadata that happened to start with an integer that matched a tag number. Instead this change makes the Verify functions more precise (just adding "number of operands" checks - not type checking those operands yet) & relies on that to decide which metadata is debug info metadata. llvm-svn: 176838
* Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.David Blaikie2013-03-112-8/+31
| | | | llvm-svn: 176837
* Assert to bounds check MDNode::getOperand.David Blaikie2013-03-081-0/+1
| | | | | | | | | The getOperandPtr utility already bounds checks, but allows one-off-the-end. This assert should catch the cases that could previously have been dereferencing these one-off-the-end pointer. Happily, no cases of this came up with this change. llvm-svn: 176721
* Replace temporary vectors with arrays.Benjamin Kramer2013-03-071-24/+12
| | | | llvm-svn: 176651
* ArrayRef has a OneElt constructor. Beautify the code.Nadav Rotem2013-03-071-2/+1
| | | | llvm-svn: 176604
* Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.Nadav Rotem2013-03-071-3/+3
| | | | llvm-svn: 176602
* Memory Dependence Analysis (not mem-dep test) take advantage of ↵Shuxin Yang2013-03-061-0/+5
| | | | | | | | | | | | | | | | "invariant.load" metadata. The "invariant.load" metadata indicates the memory unit being accessed is immutable. A load annotated with this metadata can be moved across any store. As I am not sure if it is legal to move such loads across barrier/fence, this change dose not allow such transformation. rdar://11311484 Thank Arnold for code review. llvm-svn: 176562
* Modify {Call,Invoke}Inst::addAttribute to take an AttrKind.Peter Collingbourne2013-03-021-9/+4
| | | | llvm-svn: 176397
* Removed extraneous #include "LLVMContextImpl.h" from lib/IR/Module.cppJean-Luc Duprat2013-03-011-1/+0
| | | | llvm-svn: 176382
* Cache the result of Function::getIntrinsicID() in a DenseMap attached to the ↵Michael Ilseman2013-03-014-5/+36
| | | | | | | | | | LLVMContext. This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads). Patch by Jean-Luc Duprat! llvm-svn: 176365
* Don't add the 'Value' string if there isn't one.Bill Wendling2013-02-281-1/+1
| | | | | | | | This was causing the folding set to fail to fold attributes, because it was being calculated in one spot without an empty values string but here with an empty values string. llvm-svn: 176301
OpenPOWER on IntegriCloud