File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed
Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 66dialect.
77"""
88
9- from kirin import ir , types , interp , lowering
9+ from kirin import ir , types , lowering
1010from kirin .decl import info , statement
1111from kirin .lowering import wraps
1212
@@ -112,18 +112,6 @@ class Reset(ir.Statement):
112112 wire : ir .SSAValue = info .argument (WireType )
113113
114114
115- # Issue where constant propagation can't handle
116- # multiple return values from Apply properly
117- @dialect .register (key = "constprop" )
118- class ConstPropWire (interp .MethodTable ):
119-
120- @interp .impl (Apply )
121- @interp .impl (Broadcast )
122- def apply (self , interp , frame , stmt : Apply ):
123-
124- return frame .get_values (stmt .inputs )
125-
126-
127115@wraps (Unwrap )
128116def unwrap (qubit : Qubit ) -> Wire : ...
129117
Original file line number Diff line number Diff line change 1- # There's a method table in the wire dialect statements
2- # that handles the multiple return values from Apply and Broadcast
3- # that can cause problems for constant propoagation's default implementation.
4- # These tests just make sure there are corresponding lattice types per each
5- # SSA value (as opposed to a bunch of "missing" entries despite multiple
6- # return values from Broadcast and Apply)
1+ # These tests are used to verify the multiple
2+ # result values from certain statements are handled properly
3+ # in constant propagation. Originally a custom constprop
4+ # method table had to be implemented but the newer version of
5+ # Kirin has fixed this issue (:
76
87from kirin import ir , types
98from kirin .passes import Fold
You can’t perform that action at this time.
0 commit comments