@@ -25,10 +25,6 @@ pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
25
25
analyzer. visit_basic_block_data ( block, data) ;
26
26
}
27
27
28
- for debuginfo in mir. var_debug_info . iter ( ) {
29
- analyzer. visit_var_debug_info ( debuginfo) ;
30
- }
31
-
32
28
for ( local, decl) in mir. local_decls . iter_enumerated ( ) {
33
29
let ty = fx. monomorphize ( & decl. ty ) ;
34
30
debug ! ( "local {:?} has type `{}`" , local, ty) ;
@@ -143,9 +139,7 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
143
139
) {
144
140
debug ! ( "visit_place(place={:?}, context={:?})" , place, context) ;
145
141
146
- // Except for `VarDebugInfo`, non-uses do not force locals onto the stack.
147
- //
148
- // `VarDebugInfo` is handled in `visit_var_debug_info`.
142
+ // Non-uses do not force locals onto the stack.
149
143
if !context. is_use ( ) {
150
144
return ;
151
145
}
@@ -259,27 +253,6 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
259
253
}
260
254
}
261
255
}
262
-
263
- fn visit_var_debug_info ( & mut self , var_debug_info : & mir:: VarDebugInfo < ' tcx > ) {
264
- // Indirect debuginfo requires going through memory, that only
265
- // the debugger accesses, following our emitted DWARF pointer ops.
266
- //
267
- // FIXME(eddyb) Investigate the possibility of relaxing this, but
268
- // note that `llvm.dbg.declare` *must* be used for indirect places,
269
- // even if we start using `llvm.dbg.value` for all other cases,
270
- // as we don't necessarily know when the value changes, but only
271
- // where it lives in memory.
272
- //
273
- // It's possible `llvm.dbg.declare` could support starting from
274
- // a pointer that doesn't point to an `alloca`, but this would
275
- // only be useful if we know the pointer being `Deref`'d comes
276
- // from an immutable place, and if `llvm.dbg.declare` calls
277
- // must be at the very start of the function, then only function
278
- // arguments could contain such pointers.
279
- if var_debug_info. place . is_indirect ( ) {
280
- self . not_ssa ( var_debug_info. place . local ) ;
281
- }
282
- }
283
256
}
284
257
285
258
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
0 commit comments