[flang-commits] [PATCH] D131054: [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp
Rainer Orth via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Aug 3 01:08:59 PDT 2022
ro created this revision.
ro added reviewers: rovka, schweitz.
ro added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert, pengfei, fedor.sergeev, jyknight.
Herald added a project: All.
ro requested review of this revision.
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.
There are a couple of issues, though:
- All the specializations of `GenericTarget` claim in their comments to be Linux-specific, but with the exception of `ppc64le` they are used for several other OSes as well.
- The cases in `fir::CodeGenSpecifics::get` should be sorted, but aren't.
- While Solaris/SPARC has the same issue, there's currently no SPARC support at all. I'll have to figure out how to do this. There's a comment in ` gcc/config/sparc/sparc.cc` (Functions for handling argument passing) describing the ABI for complex args and return values. The SPARC and SPARC V9 ELF psABIs don't include this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131054
Files:
flang/lib/Optimizer/CodeGen/Target.cpp
Index: flang/lib/Optimizer/CodeGen/Target.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/Target.cpp
+++ flang/lib/Optimizer/CodeGen/Target.cpp
@@ -268,6 +268,7 @@
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 @@
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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131054.449564.patch
Type: text/x-patch
Size: 898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220803/aab6fa54/attachment.bin>
More information about the flang-commits
mailing list