This is an archive of the discontinued LLVM Phabricator instance.

[flang] Clarify CheckReductionDIM()
ClosedPublic

Authored by klausler on Aug 3 2022, 12:57 PM.

Details

Summary

This utility routine in constant folding should return false when
a DIM= actual argument to a reduction intrinsic function has a
value that prevents folding, and true when folding can proceed.
The implementation was returning true in cases where a DIM=
argument was present but not constant.

Clarify the code and add commentary: a true result means that
there is no DIM= actual argument present, or that a DIM= argument
exists, is constant, and has a value that is in range.

Diff Detail

Event Timeline

klausler created this revision.Aug 3 2022, 12:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2022, 12:57 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Aug 3 2022, 12:57 PM
vdonaldson accepted this revision.Aug 3 2022, 4:06 PM
This revision is now accepted and ready to land.Aug 3 2022, 4:06 PM
This revision was automatically updated to reflect the committed changes.