Skip to content

Use TCC backend for LDC? #1464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Temtaime opened this issue Apr 27, 2016 · 5 comments
Closed

Use TCC backend for LDC? #1464

Temtaime opened this issue Apr 27, 2016 · 5 comments

Comments

@Temtaime
Copy link
Contributor

Temtaime commented Apr 27, 2016

Hi !
http://bellard.org/tcc/
TCC is a great C compiler with very fast compilation speed.
What if we could use its backend in debug builds instead of llvm ?
I think we could beat dmd.

@dnadlinger
Copy link
Member

dnadlinger commented Apr 27, 2016

Sorry, this is pretty much off topic/out of the scope of LDC. Quite simply, TCC is missing the L in the name. ;) Of course, people are always welcome to try and improve the compilation speed of D. If such a new project would still use the DMD frontend, we could even integrate it into LDC afterwards.

@redstar
Copy link
Member

redstar commented Apr 27, 2016

As a sidenote, adding a complete new backend is a considerable effort. IMHO this effort is better spent profiling LDC/LLVM.

@JohanEngelen
Copy link
Member

There is some talk in the Rust issue tracker about try to emit code such that FastISel of LLVM can be used. Supposedly, that is much faster in generating unoptimizated code... rust-lang/rust#26600 I really do not know if it is worth the effort.

@smolt
Copy link
Member

smolt commented Apr 28, 2016

Doesn't -O0 use FastISel where it can already? I'll have to read the reference.

@JohanEngelen
Copy link
Member

We don't yet use FastISel from as far as I could tell from LDC source, because I think we have to explicitly enable it. I enabled it, but it did not change compile times much. I think we fall back to the other DAG... instruction selector very quickly, as many of LDC's constructs are not supported by FastISel. Haven't really tested much though.

@dnadlinger dnadlinger changed the title Speed up ldc in debug build Use TCC backend for LDC? Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants