[flang] Lower function and subroutine calls
authorValentin Clement <clementval@gmail.com>
Wed, 23 Feb 2022 18:48:07 +0000 (19:48 +0100)
committerValentin Clement <clementval@gmail.com>
Wed, 23 Feb 2022 18:50:06 +0000 (19:50 +0100)
commitd0b70a070aedc3665e352d06c7d996a4050f8fc8
tree320e9a4847b0c8d354a4405810b5d12a57bb6242
parent427d9f60db14bd184ab70b3b9cdd1b9285d715c2
[flang] Lower function and subroutine calls

This patch introduce basic function/subroutine calls.
Because of the state of lowering only simple scalar arguments
can be used in the calls. This will be enhanced in follow up
patches with arrays, allocatable, pointer ans so on.

```
subroutine sub1()
end

subroutine sub2()
  call sub1()
end
```

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D120419

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
17 files changed:
flang/include/flang/Lower/AbstractConverter.h
flang/include/flang/Lower/CallInterface.h
flang/include/flang/Lower/ConvertExpr.h
flang/include/flang/Lower/ConvertVariable.h
flang/include/flang/Lower/StatementContext.h [new file with mode: 0644]
flang/include/flang/Optimizer/Builder/FIRBuilder.h
flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/CallInterface.cpp
flang/lib/Lower/ConvertExpr.cpp
flang/lib/Lower/ConvertVariable.cpp
flang/lib/Lower/OpenACC.cpp
flang/lib/Lower/OpenMP.cpp
flang/lib/Lower/Runtime.cpp
flang/lib/Optimizer/Builder/FIRBuilder.cpp
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/test/Lower/basic-call.f90 [new file with mode: 0644]