@@ -30,7 +30,6 @@ rewriters.
30
30
31
31
"""
32
32
module Rewriters
33
- using SymbolicUtils: @timer
34
33
using TermInterface
35
34
36
35
import SymbolicUtils: iscall, operation, arguments, sorted_arguments, metadata, node_count, _promote_symtype
@@ -69,7 +68,7 @@ Chain(rws) = Chain(rws, false)
69
68
70
69
function (rw:: Chain )(x)
71
70
for f in rw. rws
72
- y = @timer cached_repr (f) f (x)
71
+ y = f (x)
73
72
if rw. stop_on_match && ! isnothing (y) && ! isequal (y, x)
74
73
return y
75
74
end
@@ -91,7 +90,7 @@ instrument(c::RestartedChain, f) = RestartedChain(map(x->instrument(x,f), c.rws)
91
90
92
91
function (rw:: RestartedChain )(x)
93
92
for f in rw. rws
94
- y = @timer cached_repr (f) f (x)
93
+ y = f (x)
95
94
if y != = nothing
96
95
return Chain (rw. rws)(y)
97
96
end
103
102
quote
104
103
Base. @nexprs $ N i-> begin
105
104
let f = rw. rws[i]
106
- y = @timer cached_repr ( repr (f)) f (x)
105
+ y = f (x)
107
106
if y != = nothing
108
107
return Chain (rw. rws)(y)
109
108
end
@@ -122,11 +121,11 @@ instrument(x::Fixpoint, f) = Fixpoint(instrument(x.rw, f))
122
121
123
122
function (rw:: Fixpoint )(x)
124
123
f = rw. rw
125
- y = @timer cached_repr (f) f (x)
124
+ y = f (x)
126
125
while x != = y && ! isequal (x, y)
127
126
y === nothing && return x
128
127
x = y
129
- y = @timer cached_repr (f) f (x)
128
+ y = f (x)
130
129
end
131
130
return x
132
131
end
@@ -150,15 +149,15 @@ instrument(x::FixpointNoCycle, f) = Fixpoint(instrument(x.rw, f))
150
149
function (rw:: FixpointNoCycle )(x)
151
150
f = rw. rw
152
151
push! (rw. hist, hash (x))
153
- y = @timer cached_repr (f) f (x)
152
+ y = f (x)
154
153
while x != = y && hash (x) ∉ rw. hist
155
154
if y === nothing
156
155
empty! (rw. hist)
157
156
return x
158
157
end
159
158
push! (rw. hist, y)
160
159
x = y
161
- y = @timer cached_repr (f) f (x)
160
+ y = f (x)
162
161
end
163
162
empty! (rw. hist)
164
163
return x
0 commit comments