Skip value-label analysis if no value labels are present.

This commit is contained in:
Chris Fallin
2021-01-09 19:21:06 -08:00
parent c84d6be6f4
commit 997fab55d5
2 changed files with 20 additions and 0 deletions

View File

@@ -804,6 +804,10 @@ impl<'func, I: VCodeInst> Lower<'func, I> {
}
fn emit_value_label_markers_for_inst(&mut self, inst: Inst) {
if self.f.dfg.values_labels.is_none() {
return;
}
debug!(
"value labeling: srcloc {}: inst {}",
self.srcloc(inst),
@@ -815,6 +819,10 @@ impl<'func, I: VCodeInst> Lower<'func, I> {
}
fn emit_value_label_markers_for_block_args(&mut self, block: Block) {
if self.f.dfg.values_labels.is_none() {
return;
}
debug!("value labeling: block {}", block);
for &arg in self.f.dfg.block_params(block) {
self.emit_value_label_marks_for_value(arg);