[PATCH] D118436: [flang] Initial lowering for empty program
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 08:30:01 PST 2022
kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
This revision is now accepted and ready to land.
Thanks @clementval for the patch. The patch looks nice and well carved out.
I have the following suggestions. You can decide what from the following list to apply.
1. I think the SymbolMap.h movement looks like an NFC and unrelated to this patch. Can you submit that directly without a review?
2. I think from `SymbolMap.cpp` only lookupSymbol is used and other additions can be removed.
3. I would recommend removing `FirPlaceHolder` from this patch since that deals with input and output of functions/subroutines and not related to an empty program. `genFunctionType` can be replaced with the following and `- llvm::SmallVector<FirPlaceHolder> outputs;`, `llvm::SmallVector<FirPlaceHolder> inputs;` removed.
template <typename T>
mlir::FunctionType Fortran::lower::CallInterface<T>::genFunctionType() {
return mlir::FunctionType::get(&converter.getMLIRContext(), {}, {});
}
The declare function can be stripped of
for (const auto &placeHolder : llvm::enumerate(inputs))
if (!placeHolder.value().attributes.empty())
func.setArgAttrs(placeHolder.index(), placeHolder.value().attributes);
4. I think bbc.cpp includes a lot of headers that are probably not needed at the moment like unparse-with-symbols.h, SCFToStandard.h,GreedyPatternRewriteDriver.h,TargetSelect.h. Similarly for the libraries as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118436/new/
https://reviews.llvm.org/D118436
More information about the llvm-commits
mailing list