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

[RTG] Add some additional debug printing #7889

Open
wants to merge 1 commit into
base: maerhart-rtg-bags-capi
Choose a base branch
from

Conversation

maerhart
Copy link
Member

Also, preserve the set order when computing set differences.

@maerhart maerhart added the RTG Involving the `rtg` dialect label Nov 25, 2024
@maerhart maerhart force-pushed the maerhart-rtg-elaboration-debug-printing branch from 9657c9d to 5830157 Compare November 25, 2024 11:06
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 seems like a lot of the debug logic can instead be compile-time conditioned on if debugging is enabled. This opts for a more mix of compile time and run time.

Comment on lines +77 to +84
virtual std::string toString() const {
std::string out;
llvm::raw_string_ostream stream(out);
stream << "<opaque ";
value.print(stream);
stream << " at " << this << ">";
return out;
}
Copy link
Member

Choose a reason for hiding this comment

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

Can this be done by defining the << operator. This can also, if only used in debug, can be guarded under NDEBUG. E.g., something like https://github.com/llvm/circt/blob/main/include/circt/Analysis/FIRRTLInstanceInfo.h#L198

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a great point! Thanks for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RTG Involving the `rtg` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants