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

InlineExportHelper should use a hash of the function's mangled names for export helper names to reduce diff churn #213

Open
PathogenDavid opened this issue Aug 5, 2021 · 1 comment
Labels
Area-OutputGeneration Issues concerning the process of generating output from Biohazrd Concept-InlineExpectation Issues concerning problems around C++'s expectation for something to be inlined.

Comments

@PathogenDavid
Copy link
Member

It is useful to be able to use diffs to see how changes in Biohazrd affect the output of a given library's generation. However right now InlineExportHelper output tends to cause a lot of annoying-to-read diff churn when its output is affected in all but the most trivial ways.

Instead of using a monotonically increasing number we should use a hash of the function's mangled name. (Can't use the unmangled name because of overloads.)

One downside of using mangled names is that they will be different between platforms. Might consider something else like a hash of the function type's Clang spelling or the canonical location of the function. (Spelling might be hard to get right and be slow. Canonical location will cause a different type of churn when the library is updated.)

@PathogenDavid PathogenDavid added Area-OutputGeneration Issues concerning the process of generating output from Biohazrd Concept-InlineExpectation Issues concerning problems around C++'s expectation for something to be inlined. labels Aug 5, 2021
@PathogenDavid PathogenDavid moved this from Low to Very Low in Prioritization Aug 5, 2021
@PathogenDavid
Copy link
Member Author

When we do this we should also de-duplicate the inline export helpers and emit them in some sorted order. (The former should fall out of this naturally.)

Right now when TranslatedFunction instances are duplicate (IE: for lifting base members) we end up emitting the same helper more than once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-OutputGeneration Issues concerning the process of generating output from Biohazrd Concept-InlineExpectation Issues concerning problems around C++'s expectation for something to be inlined.
Projects
Development

No branches or pull requests

1 participant