about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-12 12:16:28 +0000
committerbors <bors@rust-lang.org>2023-06-12 12:16:28 +0000
commitebafbfcf354433055f58368bbf5e1a6bb298f874 (patch)
treed31b9417327f53e460a0c7962f7b2ae24c1843cb /compiler/rustc_llvm/llvm-wrapper
parenta3b185b60ae14e4aa6091606ae2ea0d9d18be93f (diff)
parent6ad7c6f4e67cd975db7993242f34d27ad893cc93 (diff)
downloadrust-ebafbfcf354433055f58368bbf5e1a6bb298f874.tar.gz
rust-ebafbfcf354433055f58368bbf5e1a6bb298f874.zip
Auto merge of #10827 - y21:large-stack-frames, r=dswij
new lint: `large_stack_frames`

This implements a lint that looks for functions that use a lot of stack space.

It uses the MIR because conveniently every temporary gets its own local and I think it maps best to stack space used in a function.
It's probably going to be quite inaccurate in release builds, but at least for debug builds where opts are less aggressive on LLVM's side I think this is accurate "enough".

(This does not work for generic functions yet. Not sure if I should try to get it working in this PR or if it could land without it for now and be added in a followup PR.)

I also put it under the nursery category because this probably needs more work...

changelog: new lint: [`large_stack_frames`]
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions