Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14846] Print SIL uses in ascending order #57193

Closed
typesanitizer opened this issue Jun 29, 2021 · 1 comment
Closed

[SR-14846] Print SIL uses in ascending order #57193

typesanitizer opened this issue Jun 29, 2021 · 1 comment
Labels
compiler The Swift compiler in itself improvement

Comments

@typesanitizer
Copy link

Previous ID SR-14846
Radar None
Original Reporter @typesanitizer
Type Improvement
Status Resolved
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement
Assignee None
Priority Medium

md5: 4944f9f8ea284d2e24cef74b9eaf982c

Issue Description:

This would probably require changing any tests checking the ordering, but it would be nice if uses were printed in sorted order. Right now, SIL printing sometimes ends up with output like users: %29, %14, %11, %6, %7, %5, %3 which is more difficult to read/match up with subsequent code.

@typesanitizer
Copy link
Author

Never mind, this is already implemented under the -emit-sorted-sil flag.

        // Display the user ids sorted to give a stable use order in the
        // printer's output if we are asked to do so. This makes diffing large
        // sections of SIL significantly easier at the expense of not showing
        // the _TRUE_ order of the users in the use list.
        if (Ctx.sortSIL()) {
          std::sort(UserIDs.begin(), UserIDs.end());
        }

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement
Projects
None yet
Development

No branches or pull requests

1 participant