This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower basic STOP statement
ClosedPublic

Authored by clementval on Feb 1 2022, 5:33 AM.

Details

Summary

This patch lowers STOP statement without arguments
and ERROR STOP. STOP statement with arguments lowering will
come in later patches ince it requires some expression lowering
to be added.
STOP statement is lowered to a runtime call.

Also makes sure we are creating a constant in the MLIR arith constant.

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Feb 1 2022, 5:33 AM
Herald added a project: Restricted Project. · View Herald Transcript
clementval requested review of this revision.Feb 1 2022, 5:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2022, 5:33 AM
clementval edited the summary of this revision. (Show Details)Feb 1 2022, 5:51 AM
clementval edited the summary of this revision. (Show Details)Feb 1 2022, 6:18 AM
kiranchandramohan accepted this revision.Feb 1 2022, 8:32 AM

LGTM.

flang/lib/Lower/Runtime.cpp
10–23

Nit: It might be possible to trim this, I guess time-intrinsic, random etc are probably not needed now.

This revision is now accepted and ready to land.Feb 1 2022, 8:32 AM
schweitz accepted this revision.Feb 1 2022, 9:33 AM
This revision was automatically updated to reflect the committed changes.