MikePopoloski/slang

Add caching of identical instance bodies

MikePopoloski opened this issue · 1 comments

Support caching instance bodies and skipping over identical copies when elaborating, to save time. Expose this functionality so that downstream consumers of the AST can easily do the same.

Note that the tricky detail here is figuring out how to handle hierarchical references into and out of the cached instances.

It is better that elabarated AST only keeps one instance of those identical instances, then visiting the AST will be faster.