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

[FIRRTL][InferWidths] Tweak debug printing to show names and more bits. #5415

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

dtzSiFive
Copy link
Contributor

I've found that 0xFFF is not enough to always produce unique strings for constraints I'm debugging, bump a bit from 4096 to 65536 for now (still keeping it short but more bits to lower chance of collision).

Also add the result of getFieldName() to the debug printing for each variable to make it easier, especially for blockarguments, to match each to its origin.

I've found that 0xFFF is not enough to always produce unique strings
for constraints I'm debugging, bump a bit from 4096 to 65536 for now
(still keeping it short but more bits to lower chance of collision).

Also add the result of `getFieldName()` to the debug printing for
each variable to make it easier, especially for blockarguments,
to match each to its origin.
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.

It may be better to allocate these from a global pool that is only visible when in debug mode.

No problem with the current patch, though!

@dtzSiFive
Copy link
Contributor Author

It may be better to allocate these from a global pool that is only visible when in debug mode.

Good call, totally, yes. Would avoid collisions entirely and probably be more readable especially on small examples (vs whatever low bits of pointers happen to be).

Will land as-is for now, but that would be better. Future work!

@dtzSiFive dtzSiFive merged commit 6583e48 into llvm:main Jun 16, 2023
5 checks passed
@dtzSiFive dtzSiFive deleted the feature/infer-widths-debug-touchup branch June 16, 2023 13:57
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.

None yet

2 participants