|
|
|
|
|
by JnRouvignac
4035 days ago
|
|
I agree the drawbacks equally apply to GCC.
I agree a simple compiler does not need an IR. Some compiler optimisations cannot exist without an IR. However I was wondering where a refactoring tool would need an IR. I found one: a CFG. For this, I need a three-address code representation. As a hypothesis, let's suppose I can build one that is independent from the input language. Once I have found how to refactor it, I then need to describe which code must be rewritten to what, in the input langage. This is the part where I find it very hard to do. I have the impression it will fall short here. That would be an interesting experiment :) |
|