Uh oh!
There was an error while loading. Please reload this page.
Add FFI bindings for LLVM's Module::getInstructionCount() - #65720
Conversation
rust-highfive
commented
Oct 23, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
Centril
commented
Oct 23, 2019
r? @eddyb |
rust-highfive
commented
Oct 23, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Uh oh!
There was an error while loading. Please reload this page.
eddyb
commented
Oct 23, 2019
It doesn't even seem to work on CI, so it might be a new addition? |
hanna-kruppe
commented
Oct 23, 2019
This API was added in llvm/llvm-project@e49374d which is in LLVM 7. |
JohnCSimon
commented
Oct 26, 2019
hanna-kruppe
commented
Oct 26, 2019
So, we can't merge this PR as is because of our LLVM version requirements. This could be solved by adding a version check ( |
icefoxen
commented
Oct 26, 2019
Sure, I can add it. It's not a huge deal either way but it doesn't look like a lot of work either. Thanks! |
icefoxen
commented
Oct 27, 2019
Added a version check. Is there anything more useful this can do besides just returning 0 if the LLVM version < 7, though? |
hanna-kruppe
commented
Oct 27, 2019
It's a bit subjective but for this use case (interactive, optional) I personally would crash with an error message to avoid silently producing misleading results. Something like |
icefoxen
commented
Oct 27, 2019
Done, thanks! |
hanna-kruppe
commented
Oct 28, 2019
r=me but please squash the commits |
JohnCSimon
commented
Nov 2, 2019
Just to make it useable for profiling and such inside rustc itself. It was vaguely useful in https://wiki.alopex.li/WhereRustcSpendsItsTime and I figured I might as well upstream it; I may or may not ever get around to doing more with it (hopefully I will), but it may be useful for others.
icefoxen
commented
Nov 2, 2019
Thank you triage, commits squashed. |
hanna-kruppe
commented
Nov 2, 2019
Thanks! @bors r+ rollup |
bors
commented
Nov 2, 2019
📌 Commit 567962d has been approved by |
…=rkruppe Add FFI bindings for LLVM's Module::getInstructionCount() Just to make it usable for profiling and such inside rustc itself. It was vaguely useful in https://wiki.alopex.li/WhereRustcSpendsItsTime and I figured I might as well upstream it; I may or may not ever get around to doing more with it (hopefully I will), but it may be useful for others.
Rollup of 10 pull requests Successful merges: - #65136 (Update codegen option documentation.) - #65574 (docs: improve disclaimer regarding LinkedList) - #65720 (Add FFI bindings for LLVM's Module::getInstructionCount()) - #65905 ([doc] fixes for unix/vxworks `OpenOptionsExt::mode`) - #65962 (Fix logic in example.) - #66019 (Improved std::iter::Chain documentation) - #66038 (doc(str): show example of chars().count() under len()) - #66042 (Suggest correct code when encountering an incorrect trait bound referencing the current trait) - #66073 (Do not needlessly write-lock) - #66096 (Add a failing UI test for multiple loops of all kinds in a `const`) Failed merges: r? @ghost
Just to make it usable for profiling and such inside
rustc itself. It was vaguely useful in
https://wiki.alopex.li/WhereRustcSpendsItsTime and I figured
I might as well upstream it; I may or may not ever get around
to doing more with it (hopefully I will), but it may be useful
for others.