This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Remove duplicated code for clause lowering
AbandonedPublic

Authored by clementval on Nov 24 2020, 4:25 PM.

Details

Summary

This patch remove some duplicated code for the clauses
lowering in different construct and ass some minor homogenization
in the OpenACC loweing code.

This code was part of the PR #558 on fir-dev
https://github.com/flang-compiler/f18-llvm-project/pull/558

Diff Detail

Event Timeline

clementval created this revision.Nov 24 2020, 4:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2020, 4:25 PM
clementval requested review of this revision.Nov 24 2020, 4:25 PM
clementval added a project: Restricted Project.Nov 24 2020, 4:30 PM
schweitz accepted this revision.Jan 4 2021, 4:59 PM

LGTM.

flang/lib/Lower/OpenACC.cpp
26

I think the prevailing style throughout LLVM, Clang, MLIR is to write the initializer as = -1;

Does it make sense to put this in a header file?

129

Could fold these two lines as

if (asyncClause->v.has_value())
146

Should the type of expr be cast to index here to be consistent with star (in the else branch)?

This revision is now accepted and ready to land.Jan 4 2021, 4:59 PM
clementval abandoned this revision.Apr 11 2022, 12:52 AM

This patch is obsolete now.

Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 12:52 AM