[flang-commits] [flang] bcb2740 - [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp

Rainer Orth via flang-commits flang-commits at lists.llvm.org
Wed Aug 17 02:55:20 PDT 2022


Author: Rainer Orth
Date: 2022-08-17T11:54:38+02:00
New Revision: bcb2740f415b0f825402f656dda3271414121a0e

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

LOG: [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp

When testing LLVM 15.0.0 rc1 on Solaris, I found that 50+ flang tests
`FAIL`ed with

  error:
/vol/llvm/src/llvm-project/local/flang/lib/Optimizer/CodeGen/Target.cpp:310:
not yet implemented: target not implemented

This patch fixes that for Solaris/x86, where the fix is trivial (just
handling it like the other x86 OSes).

Tested on `amd64-pc-solaris2.11`; only a single failure remains now.

Differential Revision: https://reviews.llvm.org/D131054

Added: 
    

Modified: 
    flang/lib/Optimizer/CodeGen/Target.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/CodeGen/Target.cpp b/flang/lib/Optimizer/CodeGen/Target.cpp
index 9ec2f04489aee..5295420ae9a85 100644
--- a/flang/lib/Optimizer/CodeGen/Target.cpp
+++ b/flang/lib/Optimizer/CodeGen/Target.cpp
@@ -268,6 +268,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, llvm::Triple &&trp,
     case llvm::Triple::OSType::Linux:
     case llvm::Triple::OSType::Darwin:
     case llvm::Triple::OSType::MacOSX:
+    case llvm::Triple::OSType::Solaris:
     case llvm::Triple::OSType::Win32:
       return std::make_unique<TargetI386>(ctx, std::move(trp),
                                           std::move(kindMap));
@@ -280,6 +281,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, llvm::Triple &&trp,
     case llvm::Triple::OSType::Linux:
     case llvm::Triple::OSType::Darwin:
     case llvm::Triple::OSType::MacOSX:
+    case llvm::Triple::OSType::Solaris:
     case llvm::Triple::OSType::Win32:
       return std::make_unique<TargetX86_64>(ctx, std::move(trp),
                                             std::move(kindMap));


        


More information about the flang-commits mailing list