{"action":"created","issue":{"url":"https://api.github.com/repos/LADSoft/OrangeC/issues/297","repository_url":"https://api.github.com/repos/LADSoft/OrangeC","labels_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/297/comments","events_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/297/events","html_url":"https://github.com/LADSoft/OrangeC/issues/297","id":388276885,"node_id":"MDU6SXNzdWUzODgyNzY4ODU=","number":297,"title":"Decoupling of the front/middle/backend","user":{"login":"chuggafan","id":15003854,"node_id":"MDQ6VXNlcjE1MDAzODU0","avatar_url":"https://avatars2.githubusercontent.com/u/15003854?v=4","gravatar_id":"","url":"https://api.github.com/users/chuggafan","html_url":"https://github.com/chuggafan","followers_url":"https://api.github.com/users/chuggafan/followers","following_url":"https://api.github.com/users/chuggafan/following{/other_user}","gists_url":"https://api.github.com/users/chuggafan/gists{/gist_id}","starred_url":"https://api.github.com/users/chuggafan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuggafan/subscriptions","organizations_url":"https://api.github.com/users/chuggafan/orgs","repos_url":"https://api.github.com/users/chuggafan/repos","events_url":"https://api.github.com/users/chuggafan/events{/privacy}","received_events_url":"https://api.github.com/users/chuggafan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-06T15:54:56Z","updated_at":"2018-12-06T22:33:22Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"So, essentially what I'm asking for here is to change OCC's internals dramatically, and I know this is a lot of work, however I think the benefits outweigh the negatives of re-writing here.\r\n\r\nSo essentially what I'm asking for is to turn the frontend of OCC into a separate program from the middle/backend, sort of like how CLANG outputs LLVM IR and then is compiled, or GCC outputs GIMPLE that gets turned into GENERIC then into assembly, etc. The main goal of this is to be able to decouple the compiler frontend from the compiler backend and make the two less reliant on each other overall, which would allow me (personally) on the #235 in stages, instead of writing the *entirety* of the compiler and then re-verifying it, it'd be simpler to write the front-end and output something standard that the middle end can consume and spit out to the backend. Decoupling all of these parts also has the distinct advantage of making OCC be able to be modified easier to handle different platforms because there's now a standard interchange format between the parts.\r\n\r\nThis issue is of similar nature to #227 in that it means we're doing a massive change to the internals and I expect something like this could take at a minimum months, but my personal feelings on this is that it would be a significant benefit in the longer term for the reasons listed above and more. I can completely understand if you see it as un-feasible but I think it's an optimistic goal to work towards."},"comment":{"url":"https://api.github.com/repos/LADSoft/OrangeC/issues/comments/445054496","html_url":"https://github.com/LADSoft/OrangeC/issues/297#issuecomment-445054496","issue_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/297","id":445054496,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTA1NDQ5Ng==","user":{"login":"chuggafan","id":15003854,"node_id":"MDQ6VXNlcjE1MDAzODU0","avatar_url":"https://avatars2.githubusercontent.com/u/15003854?v=4","gravatar_id":"","url":"https://api.github.com/users/chuggafan","html_url":"https://github.com/chuggafan","followers_url":"https://api.github.com/users/chuggafan/followers","following_url":"https://api.github.com/users/chuggafan/following{/other_user}","gists_url":"https://api.github.com/users/chuggafan/gists{/gist_id}","starred_url":"https://api.github.com/users/chuggafan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuggafan/subscriptions","organizations_url":"https://api.github.com/users/chuggafan/orgs","repos_url":"https://api.github.com/users/chuggafan/repos","events_url":"https://api.github.com/users/chuggafan/events{/privacy}","received_events_url":"https://api.github.com/users/chuggafan/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T22:33:22Z","updated_at":"2018-12-06T22:33:22Z","author_association":"CONTRIBUTOR","body":"Yhea, the way CLANG/GCC does it is that it first parses everything in the frontend and does basic IR generation with 0 optimizations yet applied, after that it goes to the middle end to do all of the optimizations from there with the hints dropped in the IR, then from that the same IR is dumped into the backend to generate the final code. I know MSVC at least does a Frontend/backend, but I don't know if there's an exact middle end where they do anything else with."}}
{"actor":{"display_login":"chuggafan"}}