summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/unconditional-branch.ll
Commit message (Collapse)AuthorAgeFilesLines
* IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith2014-12-151-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
* Switch lowering: Fix broken 'Figure out which block is next' codeHans Wennborg2014-11-291-2/+3
| | | | | | | This doesn't seem to have worked in a long time, but other optimizations would clean it up. llvm-svn: 222961
* Revert "Revert "DI: Fold constant arguments into a single MDString""Duncan P. N. Exon Smith2014-10-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | This reverts commit r218918, effectively reapplying r218914 after fixing an Ocaml bindings test and an Asan crash. The root cause of the latter was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a PR to investigate who requires the loose check (and why). Original commit message follows. -- This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 219010
* Revert "DI: Fold constant arguments into a single MDString"Duncan P. N. Exon Smith2014-10-021-9/+9
| | | | | | This reverts commit r218914 while I investigate some bots. llvm-svn: 218918
* DI: Fold constant arguments into a single MDStringDuncan P. N. Exon Smith2014-10-021-9/+9
| | | | | | | | | | | | | This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 218914
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! Note: I accidentally committed a bogus older version of this patch previously. llvm-svn: 218787
* Revert r218778 while investigating buldbot breakage.Adrian Prantl2014-10-011-2/+2
| | | | | | "Move the complex address expression out of DIVariable and into an extra" llvm-svn: 218782
* Move the complex address expression out of DIVariable and into an extraAdrian Prantl2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument of the llvm.dbg.declare/llvm.dbg.value intrinsics. Previously, DIVariable was a variable-length field that has an optional reference to a Metadata array consisting of a variable number of complex address expressions. In the case of OpPiece expressions this is wasting a lot of storage in IR, because when an aggregate type is, e.g., SROA'd into all of its n individual members, the IR will contain n copies of the DIVariable, all alike, only differing in the complex address reference at the end. By making the complex address into an extra argument of the dbg.value/dbg.declare intrinsics, all of the pieces can reference the same variable and the complex address expressions can be uniqued across the CU, too. Down the road, this will allow us to move other flags, such as "indirection" out of the DIVariable, too. The new intrinsics look like this: declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr) declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr) This patch adds a new LLVM-local tag to DIExpressions, so we can detect and pretty-print DIExpression metadata nodes. What this patch doesn't do: This patch does not touch the "Indirect" field in DIVariable; but moving that into the expression would be a natural next step. http://reviews.llvm.org/D4919 rdar://problem/17994491 Thanks to dblaikie and dexonsmith for reviewing this patch! llvm-svn: 218778
* X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused ↵NAKAMURA Takumi2014-04-081-5/+0
| | | | | | | DW_LNE_set_address was misemitted on x64. FIXME: I haven't investigate whether CalleeSaveStackSlotSize should be 8. llvm-svn: 205772
* Revert the last couple of patches here and go back to somethingEric Christopher2014-04-071-1/+3
| | | | | | that at least failed reliably. llvm-svn: 205711
* XFAIL this completely at the moment:Eric Christopher2014-04-071-0/+1
| | | | | | | | | cygwin has llvm-dwarfdump problems and isn't paying attention to the specific xfail there. s390x isn't matching for an unknown reason. llvm-svn: 205708
* Make test run on most platforms and only fail on cygwin/mingw whileEric Christopher2014-04-071-4/+1
| | | | | | it's being investigated for those. llvm-svn: 205704
* Tweak unconditional-branch.ll passing on any hosts, while investigating ↵NAKAMURA Takumi2014-04-041-2/+6
| | | | | | | | | | | | | | | | | | x86_64-mingw32. Sorry for the breakage. For now, it will fail in two ways: 1. To fail for targeting x86_64-mingw32. <stdin>:131:8: note: possible intended match here 0x30830a0100000002 3 0 1 0 0 is_stmt 2. To fail not to find the target x86. llc: : error: unable to get target for 'x86_64-unknown-unknown', see --version and --triple. llvm-svn: 205621
* unconditional-branch.ll is broken for targeting x86_64-cygming. Add an ↵NAKAMURA Takumi2014-04-031-1/+2
| | | | | | explicit triple for now. llvm-svn: 205563
* Revert r205551, "Attempt to XFAIL this on mingw and cygwin hosts." It didn't ↵NAKAMURA Takumi2014-04-031-3/+0
| | | | | | | | | | | | | | | | | | | | fail on cygming. That said, it emits errors to the stderr (with exit(0)); error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_SECREL error: failed to compute relocation: IMAGE_REL_I386_DIR32 llvm-svn: 205560
* Attempt to XFAIL this on mingw and cygwin hosts. The line table onEric Christopher2014-04-031-0/+3
| | | | | | | | | | | | these is very much off and is more than just the branch from this bug incorrect: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x30830a0100000002 3 0 1 0 0 is_stmt 0x30830a0100000008 3 0 1 0 0 is_stmt end_sequence llvm-svn: 205551
* Loosen up check so that we can pass on platforms that generateEric Christopher2014-04-031-3/+3
| | | | | | | | | | | | | | | | slightly more verbose than needed line tables, e.g.: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x0000000000000000 1 0 1 0 0 is_stmt 0x0000000000000000 1 0 1 0 0 is_stmt prologue_end 0x0000000000000010 2 0 1 0 0 is_stmt 0x0000000000000018 4 0 1 0 0 is_stmt these should probably be looked at, but it isn't affecting the correctness of the testcase. llvm-svn: 205546
* Fix for PR 19261:Eric Christopher2014-04-031-0/+64
llc doesn't generate nodes for unconditional fall-through branches for targets without FastISel implementation (X86 has it, but can be disabled by "-fast-isel=false") in SelectionDAGBuilder::visitBr(). So for line 4 in the following testcase 1: void foo(int i){ 2: switch(i){ 3: default: 4: break; 5: } 6: return; 7: } there is no corresponding line in .debug_line section, and a debugger cannot set a breakpoint at line 4. Fix this by always emitting a branch when we're not optimizing and add a testcase to ensure that there's code on every line we'd want to break. Patch by Daniil Fukalov. llvm-svn: 205529
OpenPOWER on IntegriCloud