Commit c23608b
authored
[DebugInfo][RemoveDIs] Don't pointlessly scan funcs for debug-info (#79327)
The utility functions this patch modifies are part of cleanly
transitioning from a context where we use dbg.value intrinsics to one
where we use DPValue objects to record debug-info, and back again.
However, this is a waste of time in non-debug builds (i.e. no -g on the
command line). We still have to call the function on all blocks though
to set the IsNewDbgInfoFormat flag.
To reduce the overhead of this, test whether there's any debug-info in
the function by checking whether the function has a DISubprogram, and
pass a flag down to the utility functions indicating whether they can
skip the scan.
It feels a bit dumb to me now that we're scanning and setting a flag in
a load of blocks when we don't have to -- however it's been really
valuable during development for working out where spurious dbg.value
intrinsics leak into a RemoveDIs context. Happily we'll be able to just
delete this flag entirely when RemoveDIs lands and sticks, and the
conversion routines will eventually be pushed down into the debug-info
autoupgrade path.1 parent 3ed98cb commit c23608b
File tree
3 files changed
+20
-6
lines changed- llvm
- include/llvm/IR
- lib/IR
3 files changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments