This is an archive of the discontinued LLVM Phabricator instance.

[Reassociate][NFC] Update the header comment of Reassociate Pass
Needs ReviewPublic

Authored by XChy on Jul 26 2023, 10:48 PM.

Details

Reviewers
nikic
spatel
Summary

The doc for reassociate has been outdated and inconsistent with its mechanism.
Its description about rank is wrong, which I update here.

Diff Detail

Event Timeline

XChy created this revision.Jul 26 2023, 10:48 PM
XChy requested review of this revision.Jul 26 2023, 10:48 PM
nikic added inline comments.Jul 27 2023, 5:23 AM
llvm/lib/Transforms/Scalar/Reassociate.cpp
21

I think this comment shouldn't mention exact rank numbers. The important thing to convey at this level is that the rank ordering is constants, followed by arguments, followed by RPO order of instructions.

XChy updated this revision to Diff 544752.Jul 27 2023, 6:48 AM

Emphasize ordering.