4 ms·
It's better to know that loop is a loop just from a CFG, even if it's implemented with a goto and if. In this case stripping source language semantics may be us
by sklogic 11y ago
It's better to know that loop is a loop just from a CFG, even if it's implemented with a goto and if. In this case stripping source language semantics may be useful.
- JoeAltmaier 11y agoSo true! A peephole optimizer can operate on constructs no matter how they're generated, and streamline them (use custom objects for common/slow cases). But for debugging, its nice to offer diagnostic or control features (e.g. execute 1000 times then break).
- sklogic 11y agoYou still have your loops in CFG, identifying back edges and extracting loop induction variables is mechanical. And you can lower any amount of debugging information out of your high level AST structures. No need to stay in AST to have it all.