1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use *;
/// Debug effects are similar to memory effects in that they reflect how a debugger may observe the
/// effect during execution/debugging.
///
/// Similarly, optimizations must avoid reordering operations around debug effects in the same way
/// they must not reorder around memory effects (i.e. an op with a `write` memory effect on some
/// resource must not be reordered before an op with a `read` debug effect on that same resource).
/// In practice, debug operations may declare both memory effects and debug effects, to ensure that
/// transformations which are unaware of debug effects still do the right thing with respect to
/// those operations - but this should be considered a last resort.
///
/// An operation whose value uses only include debug effects, are ignored when considering the
/// liveness of those values. This allows debug metadata to be recorded in the use-def graph,
/// without interfering with dead-code elimination and other similar optimizations.