[llvm] [mlir] [MLIR] Adopt LDBG() in EliminateBarriers.cpp (NFC) (PR #155092)
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 22:05:04 PDT 2025
================
@@ -424,27 +422,18 @@ static bool maybeCaptured(Value v) {
/// everything. This seems sufficient to achieve barrier removal in structured
/// control flow, more complex cases would require a proper dataflow analysis.
static bool mayAlias(Value first, Value second) {
- DEBUG_WITH_TYPE(DEBUG_TYPE_ALIAS, {
- DBGS_ALIAS() << "checking aliasing between ";
- DBGS_ALIAS() << first << "\n";
- DBGS_ALIAS() << " and ";
- DBGS_ALIAS() << second << "\n";
- });
+ LDBG(1, DEBUG_TYPE_ALIAS)
----------------
jpienaar wrote:
I know this is following default arguments are last kind of C++ style, but I think the opposite reads nicer here:
```
LDBG(DEBUG_TYPE, 1)
```
As the former is the higher-level filter and the latter the level within that. Thinking out loud, I wonder: could we even overload on type here? (so `LDBG(DEBUG_TYPE)` could work too).
https://github.com/llvm/llvm-project/pull/155092
More information about the llvm-commits
mailing list