[PATCH] D119698: [flang] Lower basic function with scalar integer/logical return value
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 07:20:09 PST 2022
kiranchandramohan added a comment.
Can you add a test,
-> where result is specified with the `result` keyword.
-> where there is some control flow in the function.
================
Comment at: flang/include/flang/Lower/CallInterface.h:113
+ /// Position of related passedEntity in passedArguments.
+ /// (passedEntity is the passedResult this value is resultEntityPosition.
+ int passedEntityPosition;
----------------
Nit: closing ')'. I think this is for input arguments only?
================
Comment at: flang/lib/Lower/Bridge.cpp:246
+ mlir::Value primaryFuncResultStorage;
for (const Fortran::lower::pft::Variable &var :
----------------
Where is this used?
================
Comment at: flang/lib/Lower/Bridge.cpp:362-366
+ // A function with multiple entry points returning different types
+ // tags all result variables with one of the largest types to allow
+ // them to share the same storage. Convert this to the actual type.
+ if (resultRef.getType() != resultRefType)
+ resultRef = builder->createConvert(loc, resultRefType, resultRef);
----------------
Nit: Can this be a TODO for now?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119698/new/
https://reviews.llvm.org/D119698
More information about the llvm-commits
mailing list