How can we make it easier to experiment with the compiler?
Ola Fosheim Grostad
ola.fosheim.grostad at gmail.com
Wed May 26 21:27:29 UTC 2021
On Wednesday, 26 May 2021 at 20:03:28 UTC, rikki cattermole wrote:
> Yeah, although I'll stay out of the whole IR thing as I'm no
> where near thinking about something like that.
Ok, one simple way is to just have a standard high level
intermediary language like SIL for Swift. Then authors can build
auxillary IRs that point back to the language nodes if needed.
Then run the algorithm on the auxillary IR, then modify the
language node graph accordingly. Then drop the auxillary IR and
move on to the next stage. In the end the backend receives
whatever is left of the intermediate datastructure.
Another option could be to have a mediating layer between front
and backend. The default noop layer could be designed such that
the optimizer will remove most of the overhead. Then people can
replace the mediating layer with their own datastructure that
obtains what it needs from the frontend, does something with it,
and pass everything the backend needs down to the backend.
Probably more options. I have no strong opinion of what is best.
Just settle for something that puts a clean separation layer
between front and backend without loosing sought information.
More information about the Digitalmars-d
mailing list