[PATCH] D112404: [SPIR-V] Add translator tool

Henry Linjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 28 05:45:41 PDT 2021


linjamaki marked an inline comment as done.
linjamaki added a comment.

Thanks for the review.



================
Comment at: clang/lib/Driver/ToolChains/SPIRV.cpp:18
+
+void SPIRV::constructTranslateCommand(Compilation &C, const Tool &T,
+                                      const JobAction &JA,
----------------
bader wrote:
> If this function is going to be used only by `SPIRV::Translator::ConstructJob`, it's better to make it `static` or manually inline into 4-line `SPIRV::Translator::ConstructJob`.
This function is used by HIPSPV tool chain too (D110618) by the HIPSPV::Linker::constructLinkAndEmitSpirvCommand() function.


================
Comment at: clang/lib/Driver/ToolChains/SPIRV.h:31
+  Translator(const ToolChain &TC)
+      : Tool("SPIRV::Translator", "translator", TC) {}
+
----------------
bader wrote:
> I think using just "translator" as a short name might be ambiguous.
Updated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112404/new/

https://reviews.llvm.org/D112404



More information about the cfe-commits mailing list