This is an archive of the discontinued LLVM Phabricator instance.

[NARY-REASSOCIATE][NFC] Simplify min/max handling
ClosedPublic

Authored by ebrevnov on Oct 20 2021, 3:04 AM.

Details

Summary

In order to explore different variants of reassociation current implementation uses "swap in a loop" approach. Unfortunately, the implementation is more complicated than it could be. This is an attempt to streamline the code. New approach is to extract core functionality into a helper function and call it explicitly as many times as required.

Diff Detail

Event Timeline

ebrevnov created this revision.Oct 20 2021, 3:04 AM
ebrevnov requested review of this revision.Oct 20 2021, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2021, 3:04 AM
nikic accepted this revision.Oct 20 2021, 8:09 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 20 2021, 8:09 AM
This revision was landed with ongoing or failed builds.Oct 21 2021, 1:46 AM
This revision was automatically updated to reflect the committed changes.