File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ class CadencePassAttribute:
3535ALL_CADENCE_PASSES : dict [ExportPass , CadencePassAttribute ] = {}
3636
3737
38- def get_cadence_pass_attribute (p : ExportPass ) -> CadencePassAttribute :
39- return ALL_CADENCE_PASSES [ p ]
38+ def get_cadence_pass_attribute (p : ExportPass ) -> Optional [ CadencePassAttribute ] :
39+ return ALL_CADENCE_PASSES . get ( p , None )
4040
4141
4242# A decorator that registers a pass.
@@ -61,7 +61,8 @@ def create_cadence_pass_filter(
6161 def _filter (p : ExportPass ) -> bool :
6262 pass_attribute = get_cadence_pass_attribute (p )
6363 return (
64- pass_attribute .opt_level is not None
64+ pass_attribute is not None
65+ and pass_attribute .opt_level is not None
6566 and pass_attribute .opt_level <= opt_level
6667 and (not pass_attribute .debug_pass or debug )
6768 )
You can’t perform that action at this time.
0 commit comments