This is an archive of the discontinued LLVM Phabricator instance.

[flang][OpenMP] Place the insertion point to the start of the block
ClosedPublic

Authored by SouraVX on Sep 24 2020, 5:26 AM.

Details

Summary

After skeleton of the Parallel Op is created set the insertion point to start of the block. So that later CodeGen can proceed.

Note: This patch reflects the work that can be upstreamed from PR(merged)
PR: https://github.com/flang-compiler/f18-llvm-project/pull/424

Diff Detail

Event Timeline

SouraVX created this revision.Sep 24 2020, 5:26 AM
Herald added a project: Restricted Project. · View Herald Transcript
SouraVX requested review of this revision.Sep 24 2020, 5:26 AM
SouraVX added a project: Restricted Project.Sep 24 2020, 5:26 AM

Please use a proper commit message and subject. Linking some other discussion is fine but it should be self contained.

SouraVX retitled this revision from [flang][OpenMP] Parallel region codegen support to [flang][OpenMP] Upstream OpenMP Parallel construct codegen support.Sep 24 2020, 7:03 AM
SouraVX edited the summary of this revision. (Show Details)

Please use a proper commit message and subject. Linking some other discussion is fine but it should be self contained.

Sorry, I should've done better. Now modified to convey the intent.

This is not "codegen support" is it? That sounds like "we now support codegen of X". Maybe: "Fix XXX codegen insertion point placement"?

Also "Code inside a Parallel operation region is lowered into FIR Dialect" seem to not capture this, this is just the "overall phase" in which the code is executed, right?
I mean, what happens here is the insert point is moved from something to something. Can we add a sentence that says why the new location is better? Maybe add a test?

This is not "codegen support" is it? That sounds like "we now support codegen of X". Maybe: "Fix XXX codegen insertion point placement"?

Unfortunately only a small chunk can be upstreamed, so some where context is getting lost. This PR(mentioned) does the entire "CodeGen".

Also "Code inside a Parallel operation region is lowered into FIR Dialect" seem to not capture this, this is just the "overall phase" in which the code is executed, right?
I mean, what happens here is the insert point is moved from something to something. Can we add a sentence that says why the new location is better? Maybe add a test?

Regression test capturing some statements if and print statements(with end-to-end functionally tested)has been added to PR. Again unfortunately those also can't be added here. Since Lowering Code still lives in downstream/upstream FIR dev.

Are you alluding, that this review should be renamed as some "Upstream XXXX code from PR" and nothing else ?

Are you alluding, that this review should be renamed as some "Upstream XXXX code from PR" and nothing else ?

I'm saying the commit subject and message should describe the code change. Currently, the subject and message describe the PR (I guess) but not this commit.

This is not "codegen support" is it? That sounds like "we now support codegen of X". Maybe: "Fix XXX codegen insertion point placement"?

Unfortunately only a small chunk can be upstreamed, so some where context is getting lost. This PR(mentioned) does the entire "CodeGen".

Also "Code inside a Parallel operation region is lowered into FIR Dialect" seem to not capture this, this is just the "overall phase" in which the code is executed, right?
I mean, what happens here is the insert point is moved from something to something. Can we add a sentence that says why the new location is better? Maybe add a test?

Regression test capturing some statements if and print statements(with end-to-end functionally tested)has been added to PR. Again unfortunately those also can't be added here. Since Lowering Code still lives in downstream/upstream FIR dev.

This is indeed unfortunate, to say the least.

SouraVX retitled this revision from [flang][OpenMP] Upstream OpenMP Parallel construct codegen support to [flang][OpenMP] Place the insertion point to the start of the block.Sep 24 2020, 10:16 AM
SouraVX edited the summary of this revision. (Show Details)
schweitz accepted this revision.Sep 25 2020, 10:25 AM
This revision is now accepted and ready to land.Sep 25 2020, 10:25 AM

LGTM. Tests and other changes should be upstreamed when the bridge infrastructure becomes available.