aboutsummaryrefslogtreecommitdiff
path: root/flang/lib
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-03-19 11:45:31 +0100
committerGitHub <noreply@github.com>2024-03-19 11:45:31 +0100
commitd0829fbdeda0a2faa8cf684e1396e579691bdfa2 (patch)
tree2de8559888fc1ea2287c5b525222a93005819121 /flang/lib
parentd1c37959686db3303f6d5ffaeee12be12facc640 (diff)
downloadllvm-d0829fbdeda0a2faa8cf684e1396e579691bdfa2.zip
llvm-d0829fbdeda0a2faa8cf684e1396e579691bdfa2.tar.gz
llvm-d0829fbdeda0a2faa8cf684e1396e579691bdfa2.tar.bz2
[flang] Enable polymorphic lowering by default (#83285)
Polymorphic entity lowering status is good. The main remaining TODO is to allow lowering of vector subscripted polymorphic entity, but this does not deserve blocking all application using polymorphism. Remove experimental option and enable lowering of polymorphic entity by default.
Diffstat (limited to 'flang/lib')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp5
-rw-r--r--flang/lib/Lower/CallInterface.cpp6
-rw-r--r--flang/lib/Lower/ConvertType.cpp4
3 files changed, 0 insertions, 15 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 2e3fa1f..c830c7a 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -1191,11 +1191,6 @@ bool CompilerInvocation::createFromArgs(
invoc.loweringOpts.setLowerToHighLevelFIR(false);
}
- if (args.hasArg(
- clang::driver::options::OPT_flang_experimental_polymorphism)) {
- invoc.loweringOpts.setPolymorphicTypeImpl(true);
- }
-
// -fno-ppc-native-vector-element-order
if (args.hasArg(clang::driver::options::OPT_fno_ppc_native_vec_elem_order)) {
invoc.loweringOpts.setNoPPCNativeVecElemOrder(true);
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp
index 2f95d53..c65becc 100644
--- a/flang/lib/Lower/CallInterface.cpp
+++ b/flang/lib/Lower/CallInterface.cpp
@@ -1050,12 +1050,6 @@ private:
Fortran::common::TypeCategory cat = dynamicType.category();
// DERIVED
if (cat == Fortran::common::TypeCategory::Derived) {
- // TODO is kept under experimental flag until feature is complete.
- if (dynamicType.IsPolymorphic() &&
- !getConverter().getLoweringOptions().getPolymorphicTypeImpl())
- TODO(interface.converter.getCurrentLocation(),
- "support for polymorphic types");
-
if (dynamicType.IsUnlimitedPolymorphic())
return mlir::NoneType::get(&mlirContext);
return getConverter().genType(dynamicType.GetDerivedTypeSpec());
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp
index 21564e8..e6557d7 100644
--- a/flang/lib/Lower/ConvertType.cpp
+++ b/flang/lib/Lower/ConvertType.cpp
@@ -263,10 +263,6 @@ struct TypeBuilderImpl {
llvm::SmallVector<Fortran::lower::LenParameterTy> params;
translateLenParameters(params, tySpec->category(), ultimate);
ty = genFIRType(context, tySpec->category(), kind, params);
- } else if (type->IsPolymorphic() &&
- !converter.getLoweringOptions().getPolymorphicTypeImpl()) {
- // TODO is kept under experimental flag until feature is complete.
- TODO(loc, "support for polymorphic types");
} else if (type->IsUnlimitedPolymorphic()) {
ty = mlir::NoneType::get(context);
} else if (const Fortran::semantics::DerivedTypeSpec *tySpec =