Feature request: node extract
Closed this issue · 1 comments
IanBriggs commented
It would be useful for egg to allow an extraction method that returns recexpers representing all enodes in an eclass.
I am happy to make a pull request if needed.
mwillsey commented
While implementing this, I discovered that it's actually only one line! So I don't think I'll add it to egg.
let extractor = Extractor::new(...);
let expr = node.build_recexpr(|id| extractor.find_best_node(id).clone())