[PATCH] D156424: [SPIRV] Add SPIR-V logical triple to llc
Ilia Diachkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 13:32:38 PDT 2023
iliya-diyachkov added inline comments.
================
Comment at: llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp:216-218
+static bool isEntrypoint(const Function &F) {
+ // OpenCL handling: any function with the SPIR_KERNEL
+ // calling convention will be a potential entrypoint.
----------------
Maybe rename it to isEntryPoint? Also "entrypoint" -> "entry point"?
================
Comment at: llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp:219-221
+ if (F.getCallingConv() == CallingConv::SPIR_KERNEL) {
+ return true;
+ }
----------------
Could we avoid braces?
================
Comment at: llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp:225-227
+ if (F.getFnAttribute("hlsl.shader").isValid()) {
+ return true;
+ }
----------------
Braces?
================
Comment at: llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp:234-236
+ if (STI.isOpenCLEnv()) {
+ return SPIRV::ExecutionModel::Kernel;
+ }
----------------
Braces?
================
Comment at: llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp:79-81
+ if (!isOpenCLEnv()) {
+ return false;
+ }
----------------
Braces?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156424/new/
https://reviews.llvm.org/D156424
More information about the llvm-commits
mailing list