This duplicates some argument lowering and return value processing from
flang/lib/Lower/ConvertCall.cpp. The existing code in CovertCall lowers
directly into the fir.call (without the hlfir transformational intrinsic
operation), and it is too tied to the lowering code to move into
flang/lib/Optimizer to allow for more complete re-use here.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks, it's great to see this coming along!
flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp | ||
---|---|---|
608 | resultEntity->isVariable() will be more accurate to test that this is a variable. | |
631 | I am surprised you need to do this. Isn't the pattern rewritter driver setting the insertion point of the rewritter to sum already ? | |
634 | Default kinds are set by the front end and could technically change. It is best to avoid hard coding it here, you can get it here via the kind map: builder.getKindMap().defaultLogicalKind(). | |
647–648 | mlir::Type scalarResultType = hlfir::getFortranElementType(sum.getType()); should just work given there is only one result. |
resultEntity->isVariable() will be more accurate to test that this is a variable.