Function rustc_mir_transform::sroa::escaping_locals
source · fn escaping_locals(excluded: &BitSet<Local>, body: &Body<'_>) -> BitSet<Local>Expand description
Identify all locals that are not eligible for SROA.
There are 3 cases:
- the aggregated local is used or passed to other code (function parameters and arguments);
- the locals is a union or an enum;
- the local’s address is taken, and thus the relative addresses of the fields are observable to client code.