Skip to content

Conversation

@tianrui-wei
Copy link
Contributor

A hanging bug can manifest with very large inputs to minimize at canonicalize pass. This is because if the maxNumRewrites is not set, it defaults to kNoLimit, which could be an arbitrary large number. This optional command line argument makes it possible to set the max number of rewrites for large input files to minimize.

@tianrui-wei
Copy link
Contributor Author

@fabianschuiki @seldridge from our discussions on discord.

A hanging bug can manifest with very large inputs to minimize at
canonicalize pass. This is because if the maxNumRewrites is not set,
it defaults to kNoLimit, which could be an arbitrary large number.
This optional command line argument makes it possible to set the max
number of rewrites for large input files to minimize.

Signed-off-by: Tianrui Wei <[email protected]>
@tianrui-wei tianrui-wei force-pushed the dev/tianrui/fix-stuck-canonicalize branch from c180216 to 1895634 Compare September 27, 2025 00:29
@tianrui-wei
Copy link
Contributor Author

Rebased to origin/main, and fixed the CI (hopefully).

@tianrui-wei tianrui-wei force-pushed the dev/tianrui/fix-stuck-canonicalize branch from 1895634 to d067963 Compare September 27, 2025 07:37
@tianrui-wei
Copy link
Contributor Author

Ran clang-format and pushed again.

@tianrui-wei tianrui-wei force-pushed the dev/tianrui/fix-stuck-canonicalize branch from d067963 to 5f95ee4 Compare September 29, 2025 19:13
@tianrui-wei
Copy link
Contributor Author

Sorry, fixed newer formatting errors... Could you rerun the CI again? :)

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks great. Thanks for iterating on a nice solution.

One nit related to the name of the option. One of can land this once that is cleaned up.

External symbols in the binary will cause problems for static library
builds. Switch to using an additional parameter to pass the parameter
if it exists.

Signed-off-by: Tianrui Wei <[email protected]>
@tianrui-wei tianrui-wei force-pushed the dev/tianrui/fix-stuck-canonicalize branch from 5f95ee4 to 6737163 Compare September 29, 2025 20:50
@seldridge seldridge merged commit 7726c48 into llvm:main Sep 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants