-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
incr.comp.: Turn translation-related attributes into a query. #47320
Comments
rust/src/librustc_trans/back/symbol_export.rs Lines 216 to 217 in 27ede55
It should also subsume the |
|
FWIW I started doing this for |
#47223 looks like a step in the right direction. The important thing is to extract things from attributes into queries so they can be checked for changes separately. However, since many of these things occur together, it would be a nice optimization to coalesce them. |
Indeed! |
I'm starting to work on this. |
Awesome, thank you @wesleywiser! Let me know if you need any further directions. |
This comment is just for me to organize a TODO list of what needs to be done:
|
Thanks for keeping at it, @wesleywiser! |
Sorry it's taking so long @michaelwoerister. My changes for the |
@wesleywiser, btw, I sent you a pm on gitter. I didn't find another way of contacting you. |
There are a few attributes, like
#[inline]
,#[cold]
, and#[target_feature]
, that would profit from being turned into a query:ast::Attribute
will lead to a dependency edge to HIR which is brittle because of spans,The attributes in question are listed in
trans::attributes::from_fn_attrs()
:rust/src/librustc_trans/attributes.rs
Lines 97 to 132 in 27ede55
A query could return a
TransFnAttrs
value that looks like:The
syntax::attr::{find_inline_attr, requests_inline}
should be replaced by this new query then.The ultimate goal of this refactoring is to reduce the number of false positives during incr. comp. cache invalidation by providing a "firewall" between HIR and the
compile_codegen_unit
query.The text was updated successfully, but these errors were encountered: