[llvm] [ELF] Add CPU name detection for CUDA architectures (PR #75964)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 15:29:10 PST 2023
================
@@ -517,6 +519,73 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
}
}
+StringRef ELFObjectFileBase::getNVPTXCPUName() const {
+ assert(getEMachine() == ELF::EM_CUDA);
+ unsigned SM = getPlatformFlags() & ELF::EF_CUDA_SM;
----------------
MaskRay wrote:
If SM is only used once, just inline it into the use site
https://github.com/llvm/llvm-project/pull/75964
More information about the llvm-commits
mailing list