[clang] ab1c97b - [AMDGPU] Accept/Ignore any -mcmodel arguments. (#70760)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 05:37:45 PDT 2023


Author: Pravin Jagtap
Date: 2023-10-31T18:07:40+05:30
New Revision: ab1c97b6510c4ce4643469191080a16b4007244d

URL: https://github.com/llvm/llvm-project/commit/ab1c97b6510c4ce4643469191080a16b4007244d
DIFF: https://github.com/llvm/llvm-project/commit/ab1c97b6510c4ce4643469191080a16b4007244d.diff

LOG: [AMDGPU] Accept/Ignore any -mcmodel arguments. (#70760)

Authored-by: Pravin Jagtap <Pravin.Jagtap at amd.com>

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Clang.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index fb90fcd033b1ac3..79f7fba22570746 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5743,9 +5743,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     } else if (Triple.getArch() == llvm::Triple::x86_64) {
       Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"},
                               CM);
-    } else if (Triple.isNVPTX()) {
-      // NVPTX does not care about the code model and will accept whatever works
-      // for the host.
+    } else if (Triple.isNVPTX() || Triple.isAMDGPU()) {
+      // NVPTX/AMDGPU does not care about the code model and will accept
+      // whatever works for the host.
       Ok = true;
     }
     if (Ok) {


        


More information about the cfe-commits mailing list