Commit Graph

7 Commits

Author SHA1 Message Date
Tom Weaver f2f4554f88 [debuginfo-tests][dexter] add requires lldb to two tests
both deferred_globals.cpp namespace.cpp require lldb in order to run and will
fail if it's not available.

add the required lines to the top of the tests.
2020-10-28 17:33:29 +00:00
Nabeel Omer afc44efc26 [debuginfo-tests][dexter] Add two new debug experience tests
deferred_globals.cpp: Verify that debug information for a local variable does
not hide a global definition that has the same name

namespace.cpp: Ensure that the debug information for a global variable
includes namespace information.

Differential Revision: https://reviews.llvm.org/D89462

Author:    Nabeel Omer <nabeel.omer@sony.com>
2020-10-28 14:21:40 +00:00
OCHyams 66d03af88c [DebugInfo][dexter] Add dexter tests for escaped locals
Recently there has been renewed interest in improving debug-info for variables
that (partially or otherwise) live on the stack in optimised code.

At the moment instcombine speculates that stack slots are probably going to be
promoted to registers, and prepares the debug-info accordingly. It runs a
function called LowerDbgDeclare which converts dbg.declares to a set of
dbg.values after loads, and before stores and calls. Sometimes the stack
location remains (e.g. for escaped locals). If any dbg.values become undef
where the stack location is still valid we end up unnecessarily reducing
variable location coverage due to our inability to track multiple locations
simultaneously. There is a flag to disable this feature
(-instcombine-lower-dbg-declare=0), which prevents this conversion at the cost
of sometimes providing incorrect location info in the face of DSE, DCE, GVN,
CSE etc.

This has been discussed fairly extensively on PR34136.

The idea of these tests is to provide examples of situations that we should
consider when designing a new system, to aid discussions and eventually help
evaluate the implementation.

Dexter isn't ideal for observing specific optimisation behaviour. Writing an
exaustive test suite would be difficult, and the resultant suite would be
fragile. However, I think having some concrete executable examples is useful
at least as a reference.

Differential Revision: https://reviews.llvm.org/D89543
2020-10-26 10:57:36 +00:00
Jeremy Morse 2665f3e436 Unmask dexter debuginfo tests on Darwin
These tests almost certainly work on Darwin anyway, I just wanted to
keep things in a fixed, working configuration, while pushing Dexter
up.

I've left Windows unsupported as the dexter command line will need further
adjustment to run dbgeng. This can be abstracted through the %dexter
substitution, but is a task for another time.
2019-11-01 13:12:47 +00:00
Jeremy Morse 984fad243d Reapply "Import Dexter to debuginfo-tests""
This reverts commit cb935f3456.

Discussion in D68708 advises that green dragon is being briskly
refurbished, and it's good to have this patch up testing it.
2019-10-31 16:51:53 +00:00
Jeremy Morse cb935f3456 Revert "Import Dexter to debuginfo-tests"
This reverts commit f78c236efd.

Green dragon breakage was observed; I'll take a look at why.
2019-10-31 16:22:10 +00:00
Jeremy Morse f78c236efd Import Dexter to debuginfo-tests
Dexter (Debug Experience Tester) is a test-driver for our debug info
integration tests, reading a set of debug experience expectations and
comparing them with the actual behaviour of a program under a debugger.
More about Dexter can be found in the RFC:

  http://lists.llvm.org/pipermail/llvm-dev/2019-October/135773.html

and the phab review in D68708. Not all the debuginfo tests have been
transformed into Dexter tests, and we look forwards to doing that
incrementally.

This commit mostly aims to flush out buildbots that are running
debuginfo-tests but don't have python 3 installed, possibly
green-dragon and some windows bots.
2019-10-31 13:49:47 +00:00