Commit Graph

104 Commits

Author SHA1 Message Date
Daniel Dunbar d9a1292d47 Reclaim a lost month.
llvm-svn: 84303
2009-10-17 03:28:20 +00:00
Devang Patel 8f842d31fd Parse PHI instruction with attached metadata.
llvm-svn: 84264
2009-10-16 18:45:49 +00:00
Devang Patel d0099a94db 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 3dc625cdce 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 4dbb301f17 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 0f3ef7be50 Eliminate more redundant llvm-as calls.
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman 1880092722 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 c8054d90fb Eliminate more uses of llvm-as and llvm-dis.
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman 72a13d2476 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman 9737a63ed8 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 18e03dd70c 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 80ae34974b Reapply 79977.
Use MDNodes to encode debug info in llvm IR.

llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Bill Wendling 10cdbd3b73 This is passing for PPC on Mac OS X.
llvm-svn: 80210
2009-08-27 05:49:50 +00:00
Devang Patel f08e35d9dc Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Torok Edwin 973bb97977 Remove target triple from this test, it fails on x86-64 with
--enable-targets=host-only otherwise.

llvm-svn: 80000
2009-08-25 16:53:15 +00:00
Dan Gohman 0d4bbf2c4a Remove obsolete -f flags.
llvm-svn: 79992
2009-08-25 15:38:29 +00:00
Devang Patel 02aac922b4 Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)

llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Daniel Dunbar af590e5033 Take another shot at disabling this when no ppc support is available.
llvm-svn: 79003
2009-08-14 16:40:12 +00:00
Daniel Dunbar 148edca7b8 Mark this test as requiring the powerpc target.
llvm-svn: 78961
2009-08-13 23:47:58 +00:00
Devang Patel de11f1efb0 upgrade
llvm-svn: 74016
2009-06-23 22:11:37 +00:00
Devang Patel 14491abe48 Use MainCU if it is available.
llvm-svn: 73457
2009-06-16 02:09:30 +00:00
Devang Patel 56e6fe1642 Gracefully handle imbalanced inline function begin and end markers.
llvm-svn: 73426
2009-06-15 21:45:50 +00:00
Devang Patel 64e6529e76 llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function. If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available. LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics.
Apply defensive patch to preserve at least one lexical scope till the end of function.

llvm-svn: 73282
2009-06-13 02:16:18 +00:00
Devang Patel c1fee72162 Clear AbstractInstanceRootMap at the end of the function.
llvm-svn: 73244
2009-06-12 19:24:05 +00:00
Eli Friedman 84295eb636 Fix broken logic in DominatorTreeBase::Split. Part of PR4238.
llvm-svn: 72231
2009-05-21 21:47:54 +00:00
Bill Wendling 7abc25ad68 Remove too large testcase.
llvm-svn: 71730
2009-05-13 21:51:26 +00:00
Bill Wendling 1d601cdaf4 Move the bookkeeping of the debug scopes back to the place where it
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.

llvm-svn: 71714
2009-05-13 20:33:33 +00:00
Argyrios Kyrtzidis 9ae29b2d8f -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.
-Depend on DebugLocs for source line info.

(Comes with Regression-Be-Gone(tm))

llvm-svn: 70871
2009-05-04 16:23:49 +00:00
Argyrios Kyrtzidis 79be34012f Revert r70803 for now, it causes a regression.
llvm-svn: 70811
2009-05-03 23:27:19 +00:00
Argyrios Kyrtzidis ce7196b903 -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.
-Depend on DebugLocs for source line info.

llvm-svn: 70803
2009-05-03 22:03:35 +00:00
Bill Wendling 084669a1c9 Second attempt:
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.

llvm-svn: 70343
2009-04-29 00:15:41 +00:00
Bill Wendling 56f2987a87 r70270 isn't ready yet. Back this out. Sorry for the noise.
llvm-svn: 70275
2009-04-28 01:04:53 +00:00
Bill Wendling d0ae15946c Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...

llvm-svn: 70270
2009-04-28 00:21:31 +00:00
Torok Edwin 51b4a28878 Global variables don't have a corresponding llvm.dbg.declare, yet it is possible
to obtain debug info about them.
Introduce helpers to access debug info for global variables. Also introduce a
helper that works for both local and global variables.

llvm-svn: 66541
2009-03-10 13:41:26 +00:00
Zhou Sheng abe4192442 Ignore the debug info intrinsics when looking for dependency through basic block.
llvm-svn: 66119
2009-03-05 01:45:43 +00:00
Dale Johannesen 0365d3b8b5 Make my earlier patch to skip debug intrinsics
when counting work; it was only off by 1.

llvm-svn: 65993
2009-03-04 01:20:34 +00:00
Dale Johannesen 09c3e8ec00 Instruction counters must skip the bitcasts that
feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.

llvm-svn: 65976
2009-03-03 22:36:47 +00:00
Dale Johannesen 77456b7ab4 When removing a store to an alloca that has only one
use, check also for the case where it has two uses,
the other being a llvm.dbg.declare.  This is needed so
debug info doesn't affect codegen.

llvm-svn: 65970
2009-03-03 21:26:39 +00:00
Zhou Sheng 506035105c Ignore the debug info intrinsics when adding instructions into alias sets.
llvm-svn: 65934
2009-03-03 06:02:04 +00:00
Dale Johannesen fcf4ecec45 Testcase for line number sinking in InstCombine.
llvm-svn: 65911
2009-03-03 01:10:01 +00:00
Bill Wendling 786c5973f7 - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
a DBG_LABEL or not. We want to fall back to the original way of emitting debug
  info when we're in -O0/-fast mode.
- Add plumbing in to pass the "Fast" flag to places that need it.
- XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I
  need to investigate still.

llvm-svn: 65367
2009-02-24 02:35:30 +00:00
Zhou Sheng 7c528e95af Add test case for checkin @r65314.
llvm-svn: 65315
2009-02-23 10:15:04 +00:00
Devang Patel 66c5a1dd50 The subprogram die may not exist while creating "default" scope.
llvm-svn: 64920
2009-02-18 17:29:38 +00:00
Devang Patel 97ba824ad9 Do not add redundant arguments in a method definition DIE.
llvm-svn: 63527
2009-02-02 17:51:41 +00:00
Devang Patel e7a112111a Make this test case smaller.
llvm-svn: 63526
2009-02-02 17:50:43 +00:00
Devang Patel c094970cd2 Each input file is encoded as a separate compile unit in LLVM debugging
information output. However, many target specific tool chains prefer to encode
only one compile unit in an object file. In this situation, the LLVM code
generator will include  debugging information entities in the compile unit 
that is marked as main compile unit. The code generator accepts maximum one main
compile unit per module. If a module does not contain any main compile unit 
then the code generator will emit multiple compile units in the output object 
file.

[Part 1]

Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit  to mark the unit as "main" unit. By defaults all units are considered  non-main.  Update SourceLevelDebugging.html to document "main" compile unit.

Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here.

Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit.

[Part 2]

Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs.

---

This is Part 1.

llvm-svn: 63400
2009-01-30 18:20:31 +00:00
Devang Patel acbb381cc4 Enable target tripple.
llvm-svn: 63361
2009-01-30 01:40:58 +00:00
Devang Patel a103ee4f0d Linux and other target's encoding for DW_AT_declaration may not match.
llvm-svn: 63360
2009-01-30 01:37:30 +00:00
Devang Patel 4ba91058d2 Add DW_AT_declaration for class methods.
llvm-svn: 63356
2009-01-30 01:21:46 +00:00
Dan Gohman d21775ae0e Give this test an explicit target, to make it host-independent.
llvm-svn: 63244
2009-01-28 22:14:58 +00:00