This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Support mold operand for hlfir.elemental.
ClosedPublic

Authored by vzakhari on Aug 7 2023, 11:34 AM.

Details

Summary

To properly create temporary array for a polymorphic result
of hlfir.elemental we need to keep the mold as its operand.
This patch adds just the basic support.

Diff Detail

Event Timeline

vzakhari created this revision.Aug 7 2023, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 11:34 AM
vzakhari requested review of this revision.Aug 7 2023, 11:34 AM
This revision is now accepted and ready to land.Aug 7 2023, 1:04 PM

LGTM

Thank you for all the reviews!

tblah accepted this revision.Aug 8 2023, 2:16 AM

LGTM, thanks for all of these

This revision was landed with ongoing or failed builds.Aug 8 2023, 9:59 AM
This revision was automatically updated to reflect the committed changes.

Yesterday we had a lot of changes to flang land in one build: https://lab.llvm.org/buildbot/#/builders/197/builds/8782

Which broke some llvm-test-suite tests:

FAIL: test-suite::gfortran-regression-compile-regression__allocate_with_mold_4_f90.test
FAIL: test-suite::gfortran-regression-compile-regression__c_ptr_tests_16_f90.test
FAIL: test-suite::gfortran-regression-compile-regression__init_flag_17_f90.test

This is the start of that series, with another set from @klausler . Could you co-ordinate investigating this?

I am bisecting to see if I can get specific commits to blame for each test, but I'm sure you will be able to work it out from the failure messages instead. I don't have the fortran knowledge for that.

In general please don't land so many changes in one go unless you know you will be around to deal with the potential failures. It leads to folks like myself being tempted to revert the entire series, as we don't have the specific knowledge needed to know which subset actually caused the issue.

(of course we can't always know what our colleagues are doing, so there's always a chance it can happen that way)

Actually, this bot got a much smaller change list: https://lab.llvm.org/buildbot/#/builders/176/builds/3786

This starts with Peter's changes, but I'll keep the discussion here for simplicity's sake.