Open maximebuyse opened 2 weeks ago
I am trying to extract crate protobuf
and I have a very large memory use starting at this phase. I counted the number of nodes in the expressions of the AST before and after this phase and it is multiplied by more than 1000 so clearly something is wrong there.
The
RewriteControlFlow
phase visits expressions only if they contain control flow (return
,break
,continue
). But that means visiting twice the expressions when they contain control flow which is bad in terms of complexity in the worst cases. We should check if this has an impact. A solution could be to memoize which subexpressions contain control flow.