This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add High level Fortran IR dialect
ClosedPublic

Authored by jeanPerier on Oct 20 2022, 2:57 AM.

Details

Summary

This patch adds the basic dialect definition of the HLFIR dialect that
was described in https://reviews.llvm.org/D134285.

It adds the definition of the hlfir.expr type and related tests so that
it can be verified that the dialect is properly hooked up by the tools.

Operations will be added as progress is made in the expression
lowering update.

Diff Detail

Event Timeline

jeanPerier created this revision.Oct 20 2022, 2:57 AM
Herald added a project: Restricted Project. · View Herald Transcript
jeanPerier requested review of this revision.Oct 20 2022, 2:57 AM
This revision is now accepted and ready to land.Oct 20 2022, 6:42 AM

Add missing dependencies for shared library builds

This revision was automatically updated to reflect the committed changes.

Hi @jeanPerier, one of the flang bots is failing every couple of builds since this change https://lab.llvm.org/buildbot/#/builders/173.

Specific example: https://lab.llvm.org/buildbot/#/builders/173/builds/10304

/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h:19:10: fatal error: 'flang/Optimizer/HLFIR/HLFIRDialect.h.inc' file not found
#include "flang/Optimizer/HLFIR/HLFIRDialect.h.inc"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I see you have fixed some of the other builders (thanks!) do you expect this one to be working consistently? Let me know if you need any more details about it. As flang goes, it's one of the simpler build configs.

Hi @jeanPerier, one of the flang bots is failing every couple of builds since this change https://lab.llvm.org/buildbot/#/builders/173.

Specific example: https://lab.llvm.org/buildbot/#/builders/173/builds/10304

/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h:19:10: fatal error: 'flang/Optimizer/HLFIR/HLFIRDialect.h.inc' file not found
#include "flang/Optimizer/HLFIR/HLFIRDialect.h.inc"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I see you have fixed some of the other builders (thanks!) do you expect this one to be working consistently? Let me know if you need any more details about it. As flang goes, it's one of the simpler build configs.

Hi David, thanks for the warning, I missed the mails about these failures. I think I know how to fix this build race condition. I will push a fix ASAP.

No problem, I think the first build with this commit was green so you wouldn't have seen anything else.

I have moved the bot to silent so you can now find the latest results at https://lab.llvm.org/staging/#/builders/160. So if you're short on time you don't need to rush a fix, it isn't spamming anyone.

Hi @jeanPerier, one of the flang bots is failing every couple of builds since this change https://lab.llvm.org/buildbot/#/builders/173.

Specific example: https://lab.llvm.org/buildbot/#/builders/173/builds/10304

/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h:19:10: fatal error: 'flang/Optimizer/HLFIR/HLFIRDialect.h.inc' file not found
#include "flang/Optimizer/HLFIR/HLFIRDialect.h.inc"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I see you have fixed some of the other builders (thanks!) do you expect this one to be working consistently? Let me know if you need any more details about it. As flang goes, it's one of the simpler build configs.

I merged a fix:
https://github.com/llvm/llvm-project/commit/2c0d0566ee2d871c5614b829416bb628ef1892a8

Since it is build race condition, it is hard to reproduce and be sure this fixed all, but from a build logic point of view, I think that was the problem. Thanks again for brining this to my attention.

Great! We (Linaro that is) will let you know if it comes up again.