[llvm] [OFFLOAD] Add support for more fine grained debug messages control (PR #165416)
Alex Duran via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 12:31:17 PST 2025
================
@@ -451,6 +451,8 @@ struct GenELF64PluginTy final : public GenericPluginTy {
if (auto Err = Plugin::check(ffi_init(), "failed to initialize libffi"))
return std::move(Err);
#endif
+ OFFLOAD_DEBUG("Init", 2,
----------------
adurang wrote:
I agree that you can kind of recreate it with kinds, but not having levels is not as intuitive or easy to use as a user.
Say you have 3 levels for Init. Of course you can create "Init1", "Init2", "Init3". But now you need to list of all of them get the behavior as just "Init:3". This of course because more verbose with more Kinds and more Levels. Furthermore, there's no easy way to say all "levels" of a Kind unless we want to support more complicated comparisons like "Init*" (which I personally don't think we should) but supporting syntax like "Init:*" is trivial.
IMO, yes, levels are not as fundamentally useful as Kinds (there's no dispute to that) but the complexity/benefit the provide is worth it. Furthemore, they're optional so it's not like we need to start specifying them everywhere but just where it might make sense to provide different levels of detail for the same Kind of messages.
https://github.com/llvm/llvm-project/pull/165416
More information about the llvm-commits
mailing list