]> git.lizzy.rs Git - rust.git/commitdiff
Remove debugging-related code
authorBryan Garza <1396101+bryangarza@users.noreply.github.com>
Thu, 29 Dec 2022 03:49:48 +0000 (03:49 +0000)
committerBryan Garza <1396101+bryangarza@users.noreply.github.com>
Mon, 23 Jan 2023 23:56:22 +0000 (23:56 +0000)
compiler/rustc_const_eval/src/const_eval/eval_queries.rs
compiler/rustc_const_eval/src/const_eval/machine.rs
compiler/rustc_const_eval/src/interpret/step.rs
compiler/rustc_middle/src/mir/query.rs
compiler/rustc_mir_transform/src/lib.rs

index 041e9d413575e660877e2e2e997c10637cbeb999..18e01567ca35e44888e52e19abd6bb07edca0d0e 100644 (file)
@@ -22,8 +22,6 @@
     RefTracking, StackPopCleanup,
 };
 
-use tracing::info;
-
 const NOTE_ON_UNDEFINED_BEHAVIOR_ERROR: &str = "The rules on what exactly is undefined behavior aren't clear, \
      so this check might be overzealous. Please open an issue on the rustc \
      repository if you believe it should not be considered undefined behavior.";
@@ -35,7 +33,6 @@ fn eval_body_using_ecx<'mir, 'tcx>(
     body: &'mir mir::Body<'tcx>,
 ) -> InterpResult<'tcx, MPlaceTy<'tcx>> {
     debug!("eval_body_using_ecx: {:?}, {:?}", cid, ecx.param_env);
-    info!("HERE body is {:#?}", body);
     let tcx = *ecx.tcx;
     assert!(
         cid.promoted.is_some()
index befc71ce6a0dd6271d1e5b5117042c6aee2a0a91..4709514c82e85ab70a99727065a9c2008f26dcf0 100644 (file)
@@ -369,7 +369,6 @@ fn alignment_check_failed(
         }
     }
 
-    #[instrument(skip(ecx), ret)]
     fn load_mir(
         ecx: &InterpCx<'mir, 'tcx, Self>,
         instance: ty::InstanceDef<'tcx>,
index 0f0eb5aadd71d4c88fe4a6c1760ab5bbf122ca51..6c5594bc1b0863f80d0a8a545286191d7eed2215 100644 (file)
@@ -129,7 +129,6 @@ pub fn statement(&mut self, stmt: &mir::Statement<'tcx>) -> InterpResult<'tcx> {
             // FIXME(#73156): Handle source code coverage in const eval
             Coverage(..) => {}
 
-            // FIXME(bryangarza): Update this to do some logic!!!
             ConstEvalCounter => {
                 self.increment_const_eval_counter();
             }
index c281fe00591ae1dfe09fb17047d5b79099f5e379..a8a4532223c2d901a47e1cf1f18cb21a718538e7 100644 (file)
@@ -441,14 +441,10 @@ pub fn promoted_mir_opt_const_arg(
 
     #[inline]
     pub fn mir_for_ctfe_opt_const_arg(self, def: ty::WithOptConstParam<DefId>) -> &'tcx Body<'tcx> {
-        let res = if let Some((did, param_did)) = def.as_const_arg() {
-            info!("calling mir_for_ctfe_of_const_arg for DedId {did:?}");
+        if let Some((did, param_did)) = def.as_const_arg() {
             self.mir_for_ctfe_of_const_arg((did, param_did))
         } else {
-            info!("calling mir_for_ctfe for DefId {:?}", def.did);
             self.mir_for_ctfe(def.did)
-        };
-        //info!("RES OF CALLING MIR_FOR_CTFE_OPT_CONST_ARG: {:#?}", res);
-        res
+        }
     }
 }
index e5c8127bea140d142dc463bc321ca307a13c7241..9a786d0c8d62a3de3c5ea04ad8cdc9f90e5a9e60 100644 (file)
@@ -350,14 +350,11 @@ fn mir_promoted(
 /// Compute the MIR that is used during CTFE (and thus has no optimizations run on it)
 fn mir_for_ctfe(tcx: TyCtxt<'_>, def_id: DefId) -> &Body<'_> {
     let did = def_id.expect_local();
-    let body = if let Some(def) = ty::WithOptConstParam::try_lookup(did, tcx) {
+    if let Some(def) = ty::WithOptConstParam::try_lookup(did, tcx) {
         tcx.mir_for_ctfe_of_const_arg(def)
     } else {
         tcx.arena.alloc(inner_mir_for_ctfe(tcx, ty::WithOptConstParam::unknown(did)))
-    };
-    //info!("MIR_FOR_CTFE (DefId = {def_id:?}) body res: {:#?}", body);
-    info!("MIR_FOR_CTFE (DefId = {def_id:?})");
-    body
+    }
 }
 
 /// Same as `mir_for_ctfe`, but used to get the MIR of a const generic parameter.
@@ -451,7 +448,6 @@ fn mir_drops_elaborated_and_const_checked(
 
     run_analysis_to_runtime_passes(tcx, &mut body);
 
-    //info!("MIR after runtime passes: {:#?}", body);
     tcx.alloc_steal_mir(body)
 }
 
@@ -623,7 +619,6 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
     let mut body = remap_mir_for_const_eval_select(tcx, body, hir::Constness::NotConst);
     debug!("body: {:#?}", body);
     run_optimization_passes(tcx, &mut body);
-    //info!("body after OPTIMIZATION: {:#?}", body);
 
     debug_assert!(!body.has_free_regions(), "Free regions in optimized MIR");