Commit f4a0b40
authored
[SYCL][ESIMD] Don't always dump entry points if LLVM_ENABLE_DUMP=ON (#20150)
Starting from #18684 in debug/release
with asserts builds entry points are always dumped in
ESIMDPostSplitProcessing. This is meant to be a debugging tool, but now
it is spamming build logs.
#18684 is marked as NFC, so my
assumption is that this was unintentional.
Guard the dump with a variable (disabled by default) so that it can be
enabled for debugging, the same way as it was in sycl-post-link.cpp
prior to the code move.
FYI: `LLVM_ENABLE_DUMP` is an option documented to
> Enable dump functions even when assertions are disabled
(from
[llvm/CMakeLists.txt:698](https://github.com/llvm/llvm-project/blob/32b1f167fbee28debc7527b939a6764575c854a4/llvm/CMakeLists.txt#L698))
and its typical usage is to guard the definitions of dump functions,
e.g.:
```cpp
class Foo {
// ...
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void dump() const;
#endif
}
```
and not to guard **calls** to such functions.1 parent 6b29cf1 commit f4a0b40
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 138 | + | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
| |||
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
0 commit comments