Skip to content

Commit 71cad3a

Browse files
Revert "Add user input validation to pass names passed to print-ir-after-pass."
This reverts commit 247b1f7.
1 parent e7109c9 commit 71cad3a

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

hir/src/pass/manager.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use alloc::{
44
format,
55
rc::Rc,
66
string::{String, ToString},
7-
vec::Vec,
87
};
98

109
use compact_str::{CompactString, ToCompactString};
@@ -53,27 +52,7 @@ impl TryFrom<&Options> for IRPrintingConfig {
5352
type Error = Report;
5453

5554
fn try_from(options: &Options) -> Result<Self, Self::Error> {
56-
let available_passes = [
57-
"canonicalizer",
58-
"control-flow-sink",
59-
"lift-control-flow",
60-
"sink-operand-defs",
61-
"sparse-conditional-constant-propagation",
62-
"transform-spills",
63-
];
64-
65-
let pass_filters: Vec<_> = {
66-
let invalid_pass = options
67-
.print_ir_after_pass
68-
.iter()
69-
.find(|pass| !available_passes.contains(&pass.as_str()));
70-
71-
if let Some(invalid_pass) = invalid_pass {
72-
Err(Report::msg(format!("'{invalid_pass}' unrecognized pass.")))
73-
} else {
74-
Ok(options.print_ir_after_pass.clone())
75-
}
76-
}?;
55+
let pass_filters = options.print_ir_after_pass.clone();
7756

7857
if options.print_ir_after_all && !pass_filters.is_empty() {
7958
return Err(Report::msg(

0 commit comments

Comments
 (0)