[ir] Use FriendlyName for instructions
This CL updates the disassembler to use the FriendlyName for the
instruction name. Several instructions are updated to use their
contained intrinsics or builtins to form the friendly name.
Bug: tint:1718
Change-Id: Ie3df13aefc770f9ba8314acb1b1b3e86b6fb7233
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/150101
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/exit_switch.h b/src/tint/lang/core/ir/exit_switch.h
index 80e2a54..45a2733 100644
--- a/src/tint/lang/core/ir/exit_switch.h
+++ b/src/tint/lang/core/ir/exit_switch.h
@@ -15,6 +15,8 @@
#ifndef SRC_TINT_LANG_CORE_IR_EXIT_SWITCH_H_
#define SRC_TINT_LANG_CORE_IR_EXIT_SWITCH_H_
+#include <string>
+
#include "src/tint/lang/core/ir/exit.h"
#include "src/tint/utils/rtti/castable.h"
@@ -45,7 +47,7 @@
ir::Switch* Switch();
/// @returns the friendly name for the instruction
- std::string_view FriendlyName() override { return "exit-switch"; }
+ std::string FriendlyName() override { return "exit_switch"; }
};
} // namespace tint::core::ir