[flang-dev] [EXTERNAL] Status of Flang runtime

Kiran Chandramohan via flang-dev flang-dev at lists.llvm.org
Sat Mar 27 15:58:39 PDT 2021


Hello Arnamoy,

Jean Perier from Nvidia recently created a tutorial for adding intrinsics to llvm/flang.

https://github.com/flang-compiler/f18-llvm-project/blob/fir-dev/flang/docs/tutorials/addingIntrinsics.md

Thanks,
Kiran

________________________________
From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Kiran Chandramohan via flang-dev <flang-dev at lists.llvm.org>
Sent: 01 February 2021 19:02
To: Arnamoy Bhattacharyya <arnamoy at ualberta.ca>; flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>; Perry-Holby, Alexis <aperry at lanl.gov>
Subject: Re: [flang-dev] [EXTERNAL] Status of Flang runtime

Hello Arnamoy,

Thanks for your question. I think this is a question that you can ask during the Flang calls. I will share what I know, but this info might not be accurate.

I am assuming that your question is about the non-I/O part of the flang runtime. The focus till a couple of months back was to get Flang/F18 working for F77. Since F77 does not have much of a runtime component there might not have been much thought gone into sharing a design or keeping a public todo list for the runtime.

There was a lot of work that happened initially for the implementation of folding of intrinsics with constant inputs. You can see the implementation of these in the flang/lib/Evaluate directory. You can see some TODOs in the files in the Evaluate directory. I think this is an area that you might be able to contribute to. Also see the following links.
https://github.com/llvm/llvm-project/blob/main/flang/docs/Intrinsics.md
https://github.com/llvm/llvm-project/blob/main/flang/docs/Intrinsics.md#intrinsic-functions-with-missing-folding-support

As of now, I am only aware of the date_and_time intrinsic which is implemented with a runtime function. You can see the implementation in the PR #412 (https://github.com/flang-compiler/f18-llvm-project/pull/412) in fir-dev branch. If you are interested in the runtime implementation, I believe you can take inspiration from the classic flang runtime (as hinted in https://github.com/flang-compiler/f18-llvm-project/pull/415#pullrequestreview-481755947). Since the array descriptors of classic flang and f18 are different there will be changes needed.

In general, I have often heard the following in relation to intrinsics/runtime.
For math intrinsics, the plan is to use libpgmath.
If llvm intrinsics are available, we will try to use that.
The runtime should be kept free of other libraries.

Jean Perier did much of the folding and the lowering/runtime work in fir-dev branch. He might know more. CCing @Jean Perier<mailto:jperier at nvidia.com>.

Thanks,
Kiran
________________________________
From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Perry-Holby, Alexis via flang-dev <flang-dev at lists.llvm.org>
Sent: 27 January 2021 23:13
To: Arnamoy Bhattacharyya <arnamoy at ualberta.ca>; flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>
Subject: Re: [flang-dev] [EXTERNAL] Status of Flang runtime

Hi Arnamoy,

I'm not 100% certain what the status of the runtime is, but if you are looking for ways to contribute you can check out the issues list here: https://github.com/flang-compiler/f18-llvm-project/issues .  There are a couple that I see that have the "Runtime" label attached, which may be a good place to start.

Thanks!
Alexis Perry-Holby
Los Alamos National Laboratory
Applied Computer Science (CCS-7)

On 1/9/21, 2:03 PM, "flang-dev on behalf of Arnamoy Bhattacharyya via flang-dev" <flang-dev-bounces at lists.llvm.org on behalf of flang-dev at lists.llvm.org> wrote:

    Hello all;

    I just wanted to ask what is the status of the flang runtime?  I see a
    few commits from 5 days ago in fir-dev, but could not find any status
    tracking info or any milestones?  Can anyone shed some light on what
    contribution areas are open in the runtime?

    Thank you very much.
    _______________________________________________
    flang-dev mailing list
    flang-dev at lists.llvm.org
    https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev

_______________________________________________
flang-dev mailing list
flang-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20210327/f22cd81f/attachment-0001.html>


More information about the flang-dev mailing list