Skip to content

Commit 5ddac27

Browse files
Removed the old code
1 parent f5be38b commit 5ddac27

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

flang/lib/Lower/ConvertCall.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,19 +1184,6 @@ static bool isParameterObjectOrSubObject(hlfir::Entity entity) {
11841184
return foundParameter;
11851185
}
11861186

1187-
1188-
static bool
1189-
isSimplyContiguous(const Fortran::evaluate::ActualArgument &arg,
1190-
Fortran::evaluate::FoldingContext &foldingContext) {
1191-
if (const auto *expr = arg.UnwrapExpr())
1192-
return Fortran::evaluate::IsSimplyContiguous(*expr, foldingContext);
1193-
const Fortran::semantics::Symbol *sym = arg.GetAssumedTypeDummy();
1194-
assert(sym &&
1195-
"expect ActualArguments to be expression or assumed-type symbols");
1196-
return sym->Rank() == 0 ||
1197-
Fortran::evaluate::IsSimplyContiguous(*sym, foldingContext);
1198-
}
1199-
12001187
/// When dummy is not ALLOCATABLE, POINTER and is not passed in register,
12011188
/// prepare the actual argument according to the interface. Do as needed:
12021189
/// - address element if this is an array argument in an elemental call.
@@ -1265,25 +1252,12 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
12651252
Fortran::evaluate::FoldingContext &foldingContext{
12661253
callContext.converter.getFoldingContext()};
12671254

1268-
// DEBUG: old code
1269-
const bool oldMustDoCopyInOut =
1270-
actual.isArray() && arg.mustBeMadeContiguous() &&
1271-
(passingPolymorphicToNonPolymorphic ||
1272-
!isSimplyContiguous(*arg.entity, foldingContext));
1273-
const bool oldMustDoCopyOut = arg.mayBeModifiedByCall();
1274-
12751255
bool suggestCopyIn = Fortran::evaluate::MayNeedCopy(
12761256
arg.entity, arg.characteristics, foldingContext, /*forCopyOut=*/false);
12771257
bool suggestCopyOut = Fortran::evaluate::MayNeedCopy(
12781258
arg.entity, arg.characteristics, foldingContext, /*forCopyOut=*/true);
12791259
mustDoCopyIn = actual.isArray() && suggestCopyIn;
12801260
mustDoCopyOut = actual.isArray() && suggestCopyOut;
1281-
1282-
// DEBUG:
1283-
llvm::dbgs() << "copyinout: oldMustDoCopyInOut = " << oldMustDoCopyInOut
1284-
<< ", mustDoCopyIn = " << mustDoCopyIn
1285-
<< "| oldMustDoCopyOut = " << oldMustDoCopyOut
1286-
<< ", mustDoCopyOut " << mustDoCopyOut << "\n";
12871261
}
12881262

12891263
const bool actualIsAssumedRank = actual.isAssumedRank();

0 commit comments

Comments
 (0)