Convert all log::debug to log::trace.

This commit is contained in:
Chris Fallin
2021-08-12 12:05:19 -07:00
parent 38323e0c27
commit 3e1e0f39b6
14 changed files with 282 additions and 251 deletions

View File

@@ -40,13 +40,13 @@ impl RedundantMoveEliminator {
.map(|&p| p)
.unwrap_or(RedundantMoveState::None);
log::debug!(
log::trace!(
" -> redundant move tracker: from {} to {} to_vreg {:?}",
from,
to,
to_vreg
);
log::debug!(
log::trace!(
" -> from_state {:?} to_state {:?}",
from_state,
to_state
@@ -67,29 +67,29 @@ impl RedundantMoveEliminator {
RedundantMoveState::Orig(r) => Some(r),
_ => None,
};
log::debug!(" -> src_vreg {:?}", src_vreg);
log::trace!(" -> src_vreg {:?}", src_vreg);
let dst_vreg = to_vreg.or(src_vreg);
log::debug!(" -> dst_vreg {:?}", dst_vreg);
log::trace!(" -> dst_vreg {:?}", dst_vreg);
let existing_dst_vreg = match to_state {
RedundantMoveState::Copy(_, opt_r) => opt_r,
RedundantMoveState::Orig(r) => Some(r),
_ => None,
};
log::debug!(" -> existing_dst_vreg {:?}", existing_dst_vreg);
log::trace!(" -> existing_dst_vreg {:?}", existing_dst_vreg);
let elide = match (from_state, to_state) {
(_, RedundantMoveState::Copy(orig_alloc, _)) if orig_alloc == from => true,
(RedundantMoveState::Copy(new_alloc, _), _) if new_alloc == to => true,
_ => false,
};
log::debug!(" -> elide {}", elide);
log::trace!(" -> elide {}", elide);
let def_alloc = if dst_vreg != existing_dst_vreg && dst_vreg.is_some() {
Some((to, dst_vreg.unwrap()))
} else {
None
};
log::debug!(" -> def_alloc {:?}", def_alloc);
log::trace!(" -> def_alloc {:?}", def_alloc);
// Invalidate all existing copies of `to` if `to` actually changed value.
if !elide {
@@ -100,7 +100,7 @@ impl RedundantMoveEliminator {
if from.is_reg() || to.is_reg() {
self.allocs
.insert(to, RedundantMoveState::Copy(from, dst_vreg));
log::debug!(
log::trace!(
" -> create mapping {} -> {:?}",
to,
RedundantMoveState::Copy(from, dst_vreg)
@@ -115,16 +115,16 @@ impl RedundantMoveEliminator {
}
pub fn clear(&mut self) {
log::debug!(" redundant move eliminator cleared");
log::trace!(" redundant move eliminator cleared");
self.allocs.clear();
self.reverse_allocs.clear();
}
pub fn clear_alloc(&mut self, alloc: Allocation) {
log::debug!(" redundant move eliminator: clear {:?}", alloc);
log::trace!(" redundant move eliminator: clear {:?}", alloc);
if let Some(ref mut existing_copies) = self.reverse_allocs.get_mut(&alloc) {
for to_inval in existing_copies.iter() {
log::debug!(" -> clear existing copy: {:?}", to_inval);
log::trace!(" -> clear existing copy: {:?}", to_inval);
if let Some(val) = self.allocs.get_mut(to_inval) {
match val {
RedundantMoveState::Copy(_, Some(vreg)) => {