1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

241 Commits

Author SHA1 Message Date
Rafael Espindola
9a6bbdcc7a Add triple.
llvm-svn: 131169
2011-05-10 23:14:29 +00:00
Rafael Espindola
ec3d43391f The EH symbols are only needed in eh_frame, not debug_frame.
llvm-svn: 131146
2011-05-10 19:51:53 +00:00
Rafael Espindola
92dc58fea6 Use .cfi_sections to put the unwind info in .debug_frame when possible. With
this clang will use .debug_frame in, for example,
clang -g -c -m32 test.c
This matches gcc's behaviour. It looks like .debug_frame is a bit bigger
than .eh_frame, but has the big advantage of not being allocated.

llvm-svn: 131140
2011-05-10 18:39:09 +00:00
Galina Kistanova
7371b0a61e Move few target-dependant tests to appropriate directories.
llvm-svn: 131002
2011-05-06 18:24:46 +00:00
Rafael Espindola
8346c59e6a Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.

While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.

llvm-svn: 130846
2011-05-04 17:44:06 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Devang Patel
7adf6f4b5c Add radar number for future reference.
llvm-svn: 129172
2011-04-08 23:52:04 +00:00
Devang Patel
39ac307002 Do not emit DW_AT_upper_bound and DW_AT_lower_bound for unbouded array.
If lower bound is more then upper bound then consider it is an unbounded array.
An array is unbounded if non-zero lower bound is same as upper bound.
If lower bound and upper bound are zero than array has one element.

llvm-svn: 129156
2011-04-08 21:55:10 +00:00
Devang Patel
c6ed54c434 Move test in x86 specific area.
llvm-svn: 128245
2011-03-24 22:39:09 +00:00
Devang Patel
4909f41ec5 Keep track of directory namd and fIx regression caused by Rafael's patch r119613.
A better approach would be to move source id handling inside MC.

llvm-svn: 128233
2011-03-24 20:30:50 +00:00
Devang Patel
7f687d8790 Remove obsolete tests.
llvm-svn: 126402
2011-02-24 19:09:52 +00:00
Devang Patel
bac565c8a3 Move arch specific tests in arch specific directories.
llvm-svn: 126401
2011-02-24 19:06:27 +00:00
Devang Patel
dad3193123 Hide tests, that check .loc, .file in output assembly, from darwin9 buildbot.
llvm-svn: 120750
2010-12-02 23:29:58 +00:00
Rafael Espindola
93a07b464e Change CodeGen to use .loc directives. This produces a lot more readable output
and testing is easier.  A good example is the unknown-location.ll test that
now can just look for ".loc 1 0 0".  We also don't use a DW_LNE_set_address for
every address change anymore.

llvm-svn: 119613
2010-11-18 02:04:25 +00:00
Jakob Stoklund Olesen
7c0c554397 FileCheckize
llvm-svn: 116581
2010-10-15 16:06:42 +00:00
Devang Patel
1f2abb3af0 Fix code gen crash reported in PR 8235. We still lose debug info for the unused argument here. This is a known limitation recorded debuginfo-tests/trunk/dbg-declare2.ll function 'f6' test case.
llvm-svn: 115323
2010-10-01 19:00:44 +00:00
Jim Grosbach
ad51f6522d Add target triple info to these tests to make the results comparable when
hosted on different platforms.

llvm-svn: 114965
2010-09-28 17:10:36 +00:00
Devang Patel
99777d1d07 If FE forgot to provide a file name (usually it uses "stdin" as name in such situation) then make one up to ensure that debug info is not malformed.
llvm-svn: 114119
2010-09-16 20:57:49 +00:00
Dan Gohman
1c24df6ecc Convert DbgInfoPrinter to use errs() instead of outs().
llvm-svn: 111659
2010-08-20 18:03:05 +00:00
Devang Patel
9801232716 Move x86 specific tests into test/CodeGen/X86.
llvm-svn: 110372
2010-08-05 20:25:37 +00:00
Devang Patel
754efda3aa Test case for combination of r110234 & r110235.
llvm-svn: 110238
2010-08-04 18:42:46 +00:00
Devang Patel
e401bfe168 Fix PR 7662.
Do not try to insert local variable info to a DIE used for function declaration.

llvm-svn: 108731
2010-07-19 17:53:55 +00:00
Devang Patel
93e5e9bd19 Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
llvm-svn: 107228
2010-06-30 00:11:08 +00:00
Benjamin Kramer
d02a62bee2 Fix some tests that didn't test anything.
llvm-svn: 106954
2010-06-26 20:05:06 +00:00
Devang Patel
877e8c6da0 Be specific. Use FileCheck.
llvm-svn: 106135
2010-06-16 19:39:45 +00:00
Devang Patel
dcb177952d This requires more investigation. Unblock buildbots for now.
llvm-svn: 106122
2010-06-16 18:19:49 +00:00
Devang Patel
7b26b091b6 Update test to explicitly capture llc output.
llvm-svn: 106121
2010-06-16 18:04:12 +00:00
Devang Patel
71a27d5aa6 DwarfWrite is now smart enough to drop debug value pointing to undefined register. Update this test to avoid this.
iSel not properly lowring argument into a well formed DBG_VALUE in some cases is a separate issue and not related to the test in this testcase.

llvm-svn: 105295
2010-06-01 23:01:43 +00:00
Devang Patel
b8d4476106 Keep track of incoming debug value of unused argument.
Radar 7927666.

llvm-svn: 105285
2010-06-01 19:59:01 +00:00
Bill Wendling
b6441d41de Debreak test for non-Darwin.
llvm-svn: 105257
2010-05-31 21:47:24 +00:00
Devang Patel
79c9e03097 Let's try one more time to match patterns.
The goal is to match following 3 lines. In otherwords, a temp. label between to DEBUG_VALUE comments.
        ;DEBUG_VALUE: bar:x <- undef   ## 2010-01-18-Inlined-Debug.c:7
Ltmp1:
        ;DEBUG_VALUE: foo:__x <- undef ## 2010-01-18-Inlined-Debug.c:5

llvm-svn: 104872
2010-05-27 19:46:38 +00:00
Devang Patel
7452bd4219 Temp. labels number may not match for all configurations.
llvm-svn: 104858
2010-05-27 17:51:08 +00:00
Devang Patel
747f1a373b inlined function's arguments need a label to mark the start point because they are not directly attached to current function.
llvm-svn: 104848
2010-05-27 16:47:30 +00:00
Devang Patel
bdda547db4 Simplify. Eliminate unneeded debug_loc entry.
llvm-svn: 104785
2010-05-26 23:55:23 +00:00
Devang Patel
d7ad8ac4c0 First cut at supporting .debug_loc section.
This is used to track variable information.

llvm-svn: 104649
2010-05-25 23:40:22 +00:00
Devang Patel
23f7323e7f Enable multiple Compile Units in one module.
This means now 'llvm-ld a.bc b.bc' will preserve debug info appropriately.

llvm-svn: 103439
2010-05-10 22:49:55 +00:00
Devang Patel
ee7c7143dc Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
llvm-svn: 103001
2010-05-04 06:15:30 +00:00
Devang Patel
edbef722d6 Do not ignore debug loc attached with llvm.dbg.declare while collecting debug info used by a module.
llvm-svn: 102995
2010-05-04 01:05:02 +00:00
Devang Patel
8e2e813b48 Update tests. Now DBG_VALUE instruction is created only if alloca corresponding to llvm.dbg.declare is missing.
llvm-svn: 102524
2010-04-28 20:27:48 +00:00
Dale Johannesen
af026229b2 Un-XFAIL this on ppc. My enabling of dbg_declare handling
in ISel fixed it.

llvm-svn: 102404
2010-04-27 00:01:42 +00:00
Devang Patel
ac2c76f813 Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This simplifies debug range entries.
llvm-svn: 102394
2010-04-26 22:54:28 +00:00
Devang Patel
01dcb9fa4c Remove the test for now.
llvm-svn: 102135
2010-04-22 22:06:28 +00:00
Devang Patel
cf9bece3dd Adjust debug range offsets for isWeakForLinker() functions.
llvm-svn: 102127
2010-04-22 20:52:00 +00:00
Devang Patel
def402649b Add RUN:
llvm-svn: 101913
2010-04-20 17:20:10 +00:00
Devang Patel
2a21d92744 Fix typo. add a test case.
llvm-svn: 101812
2010-04-19 20:31:39 +00:00
Devang Patel
a55e563b84 XFAIL this test for powerpc.
This test relies on iSel lowering dbg_declare intrinsic when CodeGen::OptLevel is None. On PPC side, CodeGen::OptLevel stays to default when -O0 is used on the command line.

llvm-svn: 101190
2010-04-13 23:23:09 +00:00
Devang Patel
7c2bc9dbfe Do not include types without any definition in pubtypes list.
llvm-svn: 101171
2010-04-13 20:35:04 +00:00
Chris Lattner
23334439e9 add newlines at the end of files.
llvm-svn: 100705
2010-04-07 22:53:17 +00:00
Dale Johannesen
4cdb545401 Split big test into multiple directories to cater to
those who don't build all targets.

llvm-svn: 100688
2010-04-07 20:43:35 +00:00
Dale Johannesen
7ec4547ab6 Test that DEBUG_VALUE comments come out on a variety of targets.
llvm-svn: 100682
2010-04-07 20:01:24 +00:00
Devang Patel
bcab88162a Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.
llvm-svn: 100586
2010-04-06 23:53:48 +00:00
Chris Lattner
817fa7c6de change this from using '!dbg' to using '!dbgx'. The
MD used here isn't valid for !dbg.

llvm-svn: 100085
2010-04-01 05:13:10 +00:00
Devang Patel
2a2b092bf0 Ignore invalid metadata.
llvm-svn: 99938
2010-03-30 22:09:52 +00:00
Devang Patel
58ac29f94d Do not rely on getCompileUnit() to find source file information for a subprogram.
llvm-svn: 99410
2010-03-24 18:48:00 +00:00
Devang Patel
bb15b15726 Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.
llvm-svn: 99225
2010-03-22 23:11:36 +00:00
Devang Patel
72d0d6e368 call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)
is valid, but not useful, when variable  identified by !1 is optimized away by the optimizer.

llvm-svn: 98986
2010-03-19 21:06:24 +00:00
Devang Patel
04d151f5a6 Fix llc crash on invalid input.
llvm-svn: 98369
2010-03-12 19:18:30 +00:00
Devang Patel
4853c9c8d1 Remove test to check bugfix in handing debug info for global variables using intrinsics. Now, debug info for global variable is encoded using metadata. The old code path is now history and there is no need to have a test to check a bug fix in old code path.
llvm-svn: 97477
2010-03-01 19:09:55 +00:00
Devang Patel
f05e20ef3c Remove dead test.
llvm-svn: 97474
2010-03-01 19:04:23 +00:00
Devang Patel
cdb2c39383 Replace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata.
llvm-svn: 97473
2010-03-01 19:02:51 +00:00
Devang Patel
be1150d535 These two tests check whether oprimizer safely ignores @llvm.dbg.stoppoint intrinsic or not. This intrinsic is not used anymore.
llvm-svn: 97468
2010-03-01 18:45:28 +00:00
Devang Patel
271f21327d This test checks whether LICM ignores @llvm.dbg.stoppoint intrinsics appropriately or not. Now, llvm does not use this intrinsic. Remove this test.
llvm-svn: 97466
2010-03-01 18:32:27 +00:00
Dale Johannesen
893435a736 Testcase for 94996 (PR 6157)
llvm-svn: 95021
2010-02-01 22:46:05 +00:00
Dale Johannesen
d75f9dc3ff Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.

llvm-svn: 94480
2010-01-26 00:09:58 +00:00
Devang Patel
56de8ddd56 If a instruction belongs to another function (and not current function) as per debug info attached with the instruction then ignore the dangling lexical scope of this instruction. Such scopes are unreachable.
llvm-svn: 93967
2010-01-20 02:05:23 +00:00
Dale Johannesen
5565ddfcbe Reverting.
llvm-svn: 93819
2010-01-19 00:12:05 +00:00
Dale Johannesen
0b8b2713d3 Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.

llvm-svn: 93811
2010-01-18 23:34:55 +00:00
Victor Hernandez
c1b5223e76 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.

llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Victor Hernandez
97d7107d5e Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Victor Hernandez
aee71b4e81 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.

llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Devang Patel
eb75073664 If a scope has only one instruction then first instruction is also the last instruction.
llvm-svn: 92736
2010-01-05 16:59:17 +00:00
Devang Patel
3b08c33f33 Remove dead debug info intrinsics.
Intrinsic::dbg_stoppoint
 Intrinsic::dbg_region_start 
 Intrinsic::dbg_region_end 
 Intrinsic::dbg_func_start
AutoUpgrade simply ignores these intrinsics now.

llvm-svn: 92557
2010-01-05 01:10:40 +00:00
Devang Patel
e04ac70892 Remove oversimplified test case.
llvm-svn: 92510
2010-01-04 20:54:06 +00:00
Devang Patel
46d7029a91 The test, derived from optimzed IR, does not mention "bar" in debug info anywhere so the dwarf writer is not expected to emit any debug info for function "bar".
llvm-svn: 92499
2010-01-04 19:41:13 +00:00
Devang Patel
537d43e757 XFAIL on ppc-darwin.
llvm-svn: 91495
2009-12-16 02:11:38 +00:00
Devang Patel
d5a8051dea Remove tests that are not suitable anymore. Plus they are not testing the original bugfixes anymore. These tests were inserted to check bug fixes in code that handled debug info intrinsics. These intrinsics are no longer used and now llvm parser simply ignores old .dbg intrinsics from these dead tests.
llvm-svn: 90923
2009-12-09 01:46:00 +00:00
Devang Patel
11874672da Revert 90858 90875 and 90805 for now.
llvm-svn: 90898
2009-12-08 23:21:45 +00:00
Devang Patel
cb39ef375f Do not try to push dead variable's debug info into namespace info.
llvm-svn: 90857
2009-12-08 15:01:35 +00:00
Devang Patel
45858cdfe6 Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
llvm-svn: 90247
2009-12-01 18:13:48 +00:00
Daniel Dunbar
def4580a85 Add missing run line. Devang, please check.
llvm-svn: 86795
2009-11-11 03:10:03 +00:00
Devang Patel
b3f18462ca Do not assume first function scope seen represents current function.
llvm-svn: 86771
2009-11-11 00:31:36 +00:00
Devang Patel
eb421ea5de While creating DbgScopes, do not forget parent scope.
llvm-svn: 86763
2009-11-11 00:18:40 +00:00
Gabor Greif
b0c347888a fix typo
llvm-svn: 86281
2009-11-06 20:10:46 +00:00
Devang Patel
1a557eacb8 Tolerate invalid derived type.
llvm-svn: 86269
2009-11-06 18:24:05 +00:00
Devang Patel
0d1f6a9d0e Do not bother to emit debug info for nameless global variable.
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Devang Patel
5035033346 Do not try to emit debug info entry for dead global variable.
llvm-svn: 86212
2009-11-06 01:30:04 +00:00
Devang Patel
5b0aaf3a1f Parse debug info attached with insertvalue and extractvalue instructions.
llvm-svn: 85921
2009-11-03 19:06:07 +00:00
Daniel Dunbar
7f9b7bc8ff Reclaim a lost month.
llvm-svn: 84303
2009-10-17 03:28:20 +00:00
Devang Patel
a4ac3dd8bc Parse PHI instruction with attached metadata.
llvm-svn: 84264
2009-10-16 18:45:49 +00:00
Devang Patel
5920acc861 If there is not any llvm instruction associated with each lexical scope encoded in debug info then create such scope on demand for variable info.
llvm-svn: 84262
2009-10-16 18:18:03 +00:00
Bill Wendling
d47d348cdf It's possible for a global variable to be optimized out of a metadata object. So
we should allow a "null" with this dyn_cast.

llvm-svn: 83573
2009-10-08 20:52:51 +00:00
Dan Gohman
bd50ec69e4 Move the dominator verification code out of special code embedded within
the PassManager code into a regular verifyAnalysis method.

Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.

llvm-svn: 82952
2009-09-28 00:27:48 +00:00
Dan Gohman
c9307490ce Eliminate more redundant llvm-as calls.
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman
205b641954 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00
Dan Gohman
142428ce64 Eliminate more uses of llvm-as and llvm-dis.
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman
c95df8b6d8 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
8d84372836 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.

llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Torok Edwin
31cf28eefd Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.

llvm-svn: 80778
2009-09-02 11:13:56 +00:00
Devang Patel
fbaeda732e Reapply 79977.
Use MDNodes to encode debug info in llvm IR.

llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Bill Wendling
2b2108a4de This is passing for PPC on Mac OS X.
llvm-svn: 80210
2009-08-27 05:49:50 +00:00