summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: Simplify testcase from LiveDebugVariables fix in r235140Duncan P. N. Exon Smith2015-04-171-80/+50
| | | | | | | This testcase is less brittle and exactly tests for the misbehaviour. Thanks to David Blaikie for the suggestion. llvm-svn: 235149
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-04-166-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the call instruction See r230786 and r230794 for similar changes to gep and load respectively. Call is a bit different because it often doesn't have a single explicit type - usually the type is deduced from the arguments, and just the return type is explicit. In those cases there's no need to change the IR. When that's not the case, the IR usually contains the pointer type of the first operand - but since typed pointers are going away, that representation is insufficient so I'm just stripping the "pointerness" of the explicit type away. This does make the IR a bit weird - it /sort of/ reads like the type of the first operand: "call void () %x(" but %x is actually of type "void ()*" and will eventually be just of type "ptr". But this seems not too bad and I don't think it would benefit from repeating the type ("void (), void () * %x(" and then eventually "void (), ptr %x(") as has been done with gep and load. This also has a side benefit: since the explicit type is no longer a pointer, there's no ambiguity between an explicit type and a function that returns a function pointer. Previously this case needed an explicit type (eg: a function returning a void() function was written as "call void () () * @x(" rather than "call void () * @x(" because of the ambiguity between a function returning a pointer to a void() function and a function returning void). No ambiguity means even function pointer return types can just be written alone, without writing the whole function's type. This leaves /only/ the varargs case where the explicit type is required. Given the special type syntax in call instructions, the regex-fu used for migration was a bit more involved in its own unique way (as every one of these is) so here it is. Use it in conjunction with the apply.sh script and associated find/xargs commands I've provided in rr230786 to migrate your out of tree tests. Do let me know if any of this doesn't cover your cases & we can iterate on a more general script/regexes to help others with out of tree tests. About 9 test cases couldn't be automatically migrated - half of those were functions returning function pointers, where I just had to manually delete the function argument types now that we didn't need an explicit function type there. The other half were typedefs of function types used in calls - just had to manually drop the * from those. import fileinput import sys import re pat = re.compile(r'((?:=|:|^|\s)call\s(?:[^@]*?))(\s*$|\s*(?:(?:\[\[[a-zA-Z0-9_]+\]\]|[@%](?:(")?[\\\?@a-zA-Z0-9_.]*?(?(3)"|)|{{.*}}))(?:\(|$)|undef|inttoptr|bitcast|null|asm).*$)') addrspace_end = re.compile(r"addrspace\(\d+\)\s*\*$") func_end = re.compile("(?:void.*|\)\s*)\*$") def conv(match, line): if not match or re.search(addrspace_end, match.group(1)) or not re.search(func_end, match.group(1)): return line return line[:match.start()] + match.group(1)[:match.group(1).rfind('*')].rstrip() + match.group(2) + line[match.end():] for line in sys.stdin: sys.stdout.write(conv(re.search(pat, line), line)) llvm-svn: 235145
* DebugInfo: Fix UserValue::match() in LiveDebugVariables after r235050Duncan P. N. Exon Smith2015-04-161-0/+105
| | | | | | | | r235050 dropped the inlined-at field from `MDLocalVariable`, deferring to the `!dbg` attachments. Fix `UserValue` to take the `!dbg` into account when differentiating between variables. llvm-svn: 235140
* DebugInfo: Remove 'inlinedAt:' field from MDLocalVariableDuncan P. N. Exon Smith2015-04-159-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove 'inlinedAt:' from MDLocalVariable. Besides saving some memory (variables with it seem to be single largest `Metadata` contributer to memory usage right now in -g -flto builds), this stops optimization and backend passes from having to change local variables. The 'inlinedAt:' field was used by the backend in two ways: 1. To tell the backend whether and into what a variable was inlined. 2. To create a unique id for each inlined variable. Instead, rely on the 'inlinedAt:' field of the intrinsic's `!dbg` attachment, and change the DWARF backend to use a typedef called `InlinedVariable` which is `std::pair<MDLocalVariable*, MDLocation*>`. This `DebugLoc` is already passed reliably through the backend (as verified by r234021). This commit removes the check from r234021, but I added a new check (that will survive) in r235048, and changed the `DIBuilder` API in r235041 to require a `!dbg` attachment whose 'scope:` is in the same `MDSubprogram` as the variable's. If this breaks your out-of-tree testcases, perhaps the script I used (mdlocalvariable-drop-inlinedat.sh) will help; I'll attach it to PR22778 in a moment. llvm-svn: 235050
* DebugInfo: Add missing !dbg attachments to intrinsicsDuncan P. N. Exon Smith2015-04-154-4/+4
| | | | | | | | Add missing `!dbg` attachments to `@llvm.dbg.*` intrinsics. I updated these using a script (add-dbg-to-intrinsics.sh) that I'll attach to PR22778 for posterity. llvm-svn: 235040
* DebugInfo: Pubnames: Do not include variable declarations in pubnamesDavid Blaikie2015-04-141-69/+101
| | | | | | | This causes badness for GDB which expects to find a definition in any compile_unit that has an entry for the variable in its pubnames. llvm-svn: 234915
* Update test case to include the original source code & account for some ↵David Blaikie2015-04-141-71/+71
| | | | | | | | | | | | | changes in clang's order of emission I'd added some stuff to this test case without adding the original source, which makes updating/adding further stuff rather difficult. So update it first (& it seems in the interim Clang's changed its output order a bit, so adjust the CHECK lines to account for that - rather than hand hacking the IR order which just makes it harder to maintain/change next time) llvm-svn: 234911
* Reapply "Verifier: Check for incompatible bit piece expressions"Duncan P. N. Exon Smith2015-04-131-0/+46
| | | | | | | | | | | | | | | | | | | | | This reverts commit r234717, reapplying r234698 (in spirit). As described in r234717, the original `Verifier` check had a use-after-free. Instead of storing pointers to "interesting" debug info intrinsics whose bit piece expressions should be verified once we have typerefs, do a second traversal. I've added a testcase to catch the `llc` crasher. Original commit message: Verifier: Check for incompatible bit piece expressions Convert an assertion into a `Verifier` check. Bit piece expressions must fit inside the variable, and mustn't be the entire variable. Catching this in the verifier will help us find bugs sooner, and makes `DIVariable::getSizeInBits()` dead code. llvm-svn: 234776
* Refactor a lot of duplicated code for stub output.Rafael Espindola2015-04-071-0/+53
| | | | | | | This also moves it earlier so that it they are produced before we print an end symbol for the data section. llvm-svn: 234315
* Verifier: Check that inlined-at locations agreeDuncan P. N. Exon Smith2015-04-034-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the `MDLocalVariable::getInlinedAt()` in a debug info intrinsic's variable always matches the `MDLocation::getInlinedAt()` of its `!dbg` attachment. The goal here is to get rid of `MDLocalVariable::getInlinedAt()` entirely (PR22778), since it's expensive and unnecessary, but I'll let this verifier check bake for a while (a week maybe?) first. I've updated the testcases that had the wrong value for `inlinedAt:`. This checks that things are sane in the IR, but currently things go out of whack in a few places in the backend. I'll follow shortly with assertions in the backend (with code fixes). If you have out-of-tree testcases that just started failing, here's how I updated these ones: 1. The verifier check gives you the basic block, function, instruction, and relevant metadata arguments (metadata numbering doesn't necessarily match the source file, unfortunately). 2. Look at the `@llvm.dbg.*()` instruction, and compare the `inlinedAt:` fields of the variable argument (second `metadata` argument) and the `!dbg` attachment. 3. Figure out based on the variable `scope:` chain and the functions in the file whether the variable has been inlined (and into what), so you can determine which `inlinedAt:` is actually correct. In all of the in-tree testcases, the `!MDLocation()` was correct and the `!MDLocalVariable()` was wrong, but YMMV. 4. Duplicate the metadata that you're going to change, and add/drop the `inlinedAt:` field from one of them. Be careful that the other references to the same metadata node point at the correct one. llvm-svn: 234021
* CodeGen: Fix MachineInstr::print() for DBG_VALUEDuncan P. N. Exon Smith2015-04-031-0/+56
| | | | | | | Grab the `MDLocalVariable` from the second-to-last argument; the last argument is an `MDExpression`, and mixing them up will crash. llvm-svn: 234019
* DebugInfo: Fix testcases with invalid MDSubprogram nodesDuncan P. N. Exon Smith2015-03-2818-103/+40
| | | | | | | | | | | | | | | | | Fix testcases that don't pass the verifier after a WIP patch to check `MDSubprogram` operands more effectively. I found the following issues: - When `isDefinition: false`, the `variables:` field might point at `!{i32 786468}`, or at a tuple that pointed at an empty tuple with the comment "previously: invalid DW_TAG_base_type" (I vaguely recall adding those comments during an upgrade script). In these cases, I just dropped the array. - The `variables:` field might point at something like `!{!{!8}}`, where `!8` was an `MDLocation`. I removed the extra layer of indirection. - Invalid `type:` (not an `MDSubroutineType`). llvm-svn: 233466
* DebugInfo: Fix bad debug info for compile units and typesDuncan P. N. Exon Smith2015-03-2723-27/+27
| | | | | | | | | | | | | | | | Fix debug info in these tests, which started failing with a WIP patch to verify compile units and types. The problems look like they were all caused by bitrot. They fell into these categories: - Using `!{i32 0}` instead of `!{}`. - Using `!{null}` instead of `!{}`. - Using `!MDExpression()` instead of `!{}`. - Using `!8` instead of `!{!8}`. - `file:` references that pointed at `MDCompileUnit`s instead of the same `MDFile` as the compile unit. - `file:` references that were numerically off-by-one or (off-by-ten). llvm-svn: 233415
* Simplify missing-file-line.ll test.Peter Collingbourne2015-03-251-18/+14
| | | | llvm-svn: 233201
* DebugInfo: Permit DW_TAG_structure_type, DW_TAG_member, DW_TAG_typedef tags ↵Peter Collingbourne2015-03-251-0/+61
| | | | | | | | | | | | | | | | | with empty file names. Some languages, such as Go, have pre-defined structure types (e.g. "string" is essentially a pointer/length pair) or pre-defined "typedef" types (e.g. "error" is essentially a typedef for a specific interface type). Such types do not have associated source location, so a Go frontend would be correct not to associate a file name with such types. This change relaxes the DIType verifier to permit unlocated types with these tags. Differential Revision: http://reviews.llvm.org/D8588 llvm-svn: 233200
* Refactor how passes get a symbol at the end of a section.Rafael Espindola2015-03-232-6/+5
| | | | | | | | | | There is now a canonical symbol at the end of a section that different passes can request. This also allows us to assert that we don't switch back to a section whose end symbol has already been printed. llvm-svn: 233026
* Emit the offset directly instead of creating a dummy expression.Rafael Espindola2015-03-171-0/+5
| | | | | | | | We were creating an expression of the form (S+C)-S which is just C. Patch by Frédéric Riss. I just added the testcase. llvm-svn: 232549
* Centralize the handling of unique ids for temporary labels.Rafael Espindola2015-03-171-1/+1
| | | | | | | | | | | | | | | | Before this patch code wanting to create temporary labels for a given entity (function, cu, exception range, etc) had to keep its own counter to have stable symbol names. createTempSymbol would still add a suffix to make sure a new symbol was always returned, but it kept a single counter. Because of that, if we were to use just createTempSymbol("cu_begin"), the label could change from cu_begin42 to cu_begin43 because some other code started using temporary labels. Simplify this by just keeping one counter per prefix and removing the various specialized counters. llvm-svn: 232535
* DebugInfo: Fix testcases that fail -verify-debug-info=trueDuncan P. N. Exon Smith2015-03-161-2/+2
| | | | | | | | | | | | | | | | | | As part of PR22777, fix testcases that fail the debug info verifier. The changes fall into the following categories: - Empty `filename:` fields in `MDFile`s. Compile units and some types require non-empty filenames. A number of testcases have empty filenames, probably due to hand-reduction of testcases. - Not-quite empty arrays: `!{i32 0}`. This used to be equivalent in the debug info schema to `!{}`. They cause problems for `!MDSubroutineType`'s `types:` array, since it requires all operands to be valid types. (Note that `!{null}` is the correct type array for functions that take no arguments and return `void`.) - Significantly bitrotted testcases. Nodes got left behind a few upgrades ago because of missing or invalid tags. llvm-svn: 232415
* Use the i8 immediate cmp instructions when possible.Rafael Espindola2015-03-162-6/+6
| | | | llvm-svn: 232378
* Use add32ri8 and friends on fast isel.Rafael Espindola2015-03-131-1/+1
| | | | | | | | | | | | | | | This fixes pr22854. The core issue on the bug is that there are multiple instructions that print the same in assembly. In fact, there doesn't seem to be any syntax for specifying that a constant that fits in 8 bits should use a 32 bit immediate. The attached patch changes fast isel to consider i16immSExt8, i32immSExt8, and i64immSExt8. They were disabled because fastisel didn’t know to call the predicate back in the day. llvm-svn: 232223
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-03-1312-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gep operator Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) llvm-svn: 232184
* Don't print labels that on ELF are never used.Rafael Espindola2015-03-111-1/+0
| | | | llvm-svn: 231904
* Relax label CHECK to mach COFF syntax.Rafael Espindola2015-03-111-0/+57
| | | | | | | | Should fix the cygwin bots. I added a cygwin specific test that would have caught this on Linux. llvm-svn: 231899
* Print section start labels when first switching to the section.Rafael Espindola2015-03-114-2/+34
| | | | | | | This is less brittle and avoids polluting the start of the file with every debug section. llvm-svn: 231898
* Split test in two to handle building without x86.Rafael Espindola2015-03-101-0/+26
| | | | llvm-svn: 231886
* Emit correct linkage-name attribute based on DWARF version.Paul Robinson2015-03-108-12/+12
| | | | | | | | | | There are still 4 tests that check for DW_AT_MIPS_linkage_name, because they specify DWARF 2 or 3 in the module metadata. So, I didn't create an explicit version-based test for the attribute. Differential Revision: http://reviews.llvm.org/D8227 llvm-svn: 231880
* Use a better name for compile unit labels.Rafael Espindola2015-03-105-7/+7
| | | | | | | | | | | | | They mark the start of a compile unit, so name them .Lcu_*. Using Section->getLabelBeginName() makes it looks like they mark the start of the section. While at it, switch to createTempSymbol to avoid collisions with labels created in inline assembly. Not sure if a "don't crash" test is worth it. With this getLabelBeginName is dead, delete it. llvm-svn: 231750
* Use a MapVector instead of an extra sort.Rafael Espindola2015-03-091-9/+9
| | | | | | This also has the advantage of not depending on the brittle getLabelBeginName. llvm-svn: 231714
* Don't prime the section map.Rafael Espindola2015-03-091-1/+4
| | | | | | | This was just creating unused labels for .text when the module had no functions. llvm-svn: 231694
* Use the existing begin and end symbol for debug info.Rafael Espindola2015-03-052-2/+2
| | | | llvm-svn: 231338
* Turn off .debug_pubnames/pubtypes for PS4.Paul Robinson2015-03-051-4/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D8067 llvm-svn: 231322
* Support standard DWARF TLS opcode; Darwin and PS4 use it.Paul Robinson2015-03-041-6/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D8018 llvm-svn: 231286
* Update the out-of-date dwarf expressions in these testcases.Adrian Prantl2015-03-041-2/+2
| | | | llvm-svn: 231261
* Use the vanilla func_end symbol for .size.Rafael Espindola2015-03-042-2/+2
| | | | | | No need to create yet another temp symbol. llvm-svn: 231198
* [X86][ELF] Correct relocation for DWARF TLS referencesPaul Robinson2015-03-031-0/+6
| | | | | | | | | Previously we had only Linux using DTPOFF for these; all X86 ELF targets should. Fixes a side issue mentioned in PR21077. Differential Revision: http://reviews.llvm.org/D8011 llvm-svn: 231130
* Fix PR22762. When emitting a DWARF expression check whether this is theAdrian Prantl2015-03-031-0/+60
| | | | | | | | frame register before checking if there is a DWARF register number for it. Thanks to H.J. Lu for diagnosing this and providing the testcase! llvm-svn: 231121
* DebugInfo: Move new hierarchy into placeDuncan P. N. Exon Smith2015-03-03128-2505/+2505
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the specialized metadata nodes for the new debug info hierarchy into place, finishing off PR22464. I've done bootstraps (and all that) and I'm confident this commit is NFC as far as DWARF output is concerned. Let me know if I'm wrong :). The code changes are fairly mechanical: - Bumped the "Debug Info Version". - `DIBuilder` now creates the appropriate subclass of `MDNode`. - Subclasses of DIDescriptor now expect to hold their "MD" counterparts (e.g., `DIBasicType` expects `MDBasicType`). - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp` for printing comments. - Big update to LangRef to describe the nodes in the new hierarchy. Feel free to make it better. Testcase changes are enormous. There's an accompanying clang commit on its way. If you have out-of-tree debug info testcases, I just broke your build. - `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to update all the IR testcases. - Unfortunately I failed to find way to script the updates to CHECK lines, so I updated all of these by hand. This was fairly painful, since the old CHECKs are difficult to reason about. That's one of the benefits of the new hierarchy. This work isn't quite finished, BTW. The `DIDescriptor` subclasses are almost empty wrappers, but not quite: they still have loose casting checks (see the `RETURN_FROM_RAW()` macro). Once they're completely gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I also expect to make a few schema changes now that it's easier to reason about everything. llvm-svn: 231082
* Revert r230979, should apply to all X86 ELF.Paul Robinson2015-03-021-3/+0
| | | | llvm-svn: 230985
* [PS4] Correct relocation for DWARF TLS references.Paul Robinson2015-03-021-0/+3
| | | | llvm-svn: 230979
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-2765-214/+214
| | | | | | | | | | | | | | | | | | | | | | | | load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-2735-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getelementptr instruction One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 llvm-svn: 230786
* DebugInfo: Match Name and DisplayName in testcaseDuncan P. N. Exon Smith2015-02-191-2/+2
| | | | | | | | | There's no way for `DIBuilder` to create a subprogram or global variable where `getName()` and `getDisplayName()` give different answers. This testcase managed to achieve the feat though. This was probably just left behind in some sort of upgrade along the way. llvm-svn: 229930
* Debug info: When updating debug info during SROA, do not emit debug infoAdrian Prantl2015-02-091-0/+91
| | | | | | | | | | for any padding introduced by SROA. In particular, do not emit debug info for an alloca that represents only the padding introduced by a previous iteration. Fixes PR22495. llvm-svn: 228632
* Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in theAdrian Prantl2015-02-099-21/+21
| | | | | | | | | | | intermediate representation. This - increases consistency by using the same granularity everywhere - allows for pieces < 1 byte - DW_OP_piece didn't actually allow storing an offset. Part of PR22495. llvm-svn: 228631
* DebugInfo: Remove DW_TAG_constantDuncan P. N. Exon Smith2015-02-091-31/+0
| | | | | | | | Remove handling for DW_TAG_constant. We started producing it in r110656, but reverted that in r110876 without dropping the support. Finish the job. llvm-svn: 228623
* MC: Emit COFF section flags in the "proper" orderDavid Majnemer2015-02-071-1/+1
| | | | | | | | COFF section flags are not idempotent: 'rd' will make a read-write section because 'd' implies write 'dr' will make a read-only section because 'r' disables write llvm-svn: 228490
* Debug Info: Relax assertion in isUnsignedDIType() to allow floats to beAdrian Prantl2015-02-021-0/+55
| | | | | | | | | | | | | | | described by integer constants. This is a bit ugly, but if the source language allows arbitrary type casting, the debug info must follow suit. For example: void foo() { float a; *(int *)&a = 0; } For the curious: SROA replaces the float alloca with an i32 alloca, which is then optimized away and described via dbg.value(i32 0, ...). llvm-svn: 227827
* Fix PR22393. When recursively replacing an aggregate with a smallerAdrian Prantl2015-02-011-0/+146
| | | | | | | | aggregate or scalar, the debug info needs to refer to the absolute offset (relative to the entire variable) instead of storing the offset inside the smaller aggregate. llvm-svn: 227702
* Add missing tags.Adrian Prantl2015-02-012-2/+2
| | | | llvm-svn: 227701
OpenPOWER on IntegriCloud