Page MenuHomePhabricator

[FLANG]Remove experimental flag from SUM simplification
ClosedPublic

Authored by Leporacanthicus on Aug 24 2022, 8:34 AM.

Details

Summary

The SUM function does appear to be safe to use, so remove the
experimental flag for the SUM operation.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 24 2022, 8:34 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
Leporacanthicus requested review of this revision.Aug 24 2022, 8:34 AM
vzakhari accepted this revision.Aug 24 2022, 8:40 AM

LGTM

flang/test/Transforms/simplifyintrinsics.fir
1

nit: we may keep it here, if we are going to add tests for future experimental implementations in this file.

This revision is now accepted and ready to land.Aug 24 2022, 8:40 AM
awarzynski accepted this revision.Aug 24 2022, 8:46 AM
awarzynski added inline comments.
flang/test/Transforms/simplifyintrinsics.fir
1

No harm in having a separate file with "experimental" simplifications, This way it will be easier to distinguish the two.

flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
446–447

This should of course be removed. New patch coming soon! :)

clementval added inline comments.
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
447

You should use RTNAME(Sum) instead of hardcoded function name.

Remove comment that was no longer valid

Add trivial test for experimental flag

I think my patch is messed up, however. It seems to have included my refactoring as well, which should be a separate patch.

I'll try to fix tomorrow.

flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
447

Ah, very good point. I will make a separate patch, as this applies to more than the bits touched in this patch.

Trying again, patch seems to have got messed up.