Re: [Tinycc-devel] Questions about the future of TinyCC

2024-04-08 Thread Steffen Nurpmeso
tinycc-devel@nongnu.org wrote in
 :
 ...
 |> It seems the old "portable C compiler" is either gone or abandoned
 |> (the website is down). 
 |
 |pcc is still under development, but the pcc webpages are often down.
 |[1]https://pcc.ludd.ltu.se[/1]

Arnold "Aharon" Robbins (gawk, nawk, etc) has a mirror on github

  https://github.com/arnoldrobbins/pcc-revived.git

 |pcc has more / different targets and even 
 |basic frontends for Fortran77 and c++,
 |but development is very slow, done by one person.
 ...

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Questions about the future of TinyCC

2024-04-07 Thread Detlef Riekenberg via Tinycc-devel
Hi César Welcome to TinyCC> Basically, what I need is just a C compiler.> Written in C. A good C compiler. It depends, what you define as a 'good' compiler.TinyCC is a single pass compiler and very good at compilation speed.The code created by TinyCC is often remarkable slower,compared to code created by gcc/clang.> With a not too complex code tree and > reasonably easy to port to new targets in the future. That's it. Yes, the simple codebase is one of the goals of tcc.> It seems the old "portable C compiler" is either gone or abandoned> (the website is down). pcc is still under development, but the pcc webpages are often down.https://pcc.ludd.ltu.sepcc has more / different targets and even basic frontends for Fortran77 and c++,but development is very slow, done by one person.> TinyCC looks very appealing to me, but, before I embark on it,> are there any important warnings I should be aware of? * TinyCC has only very few optimizations   (only constant folding and in some situations code supression)* TinyCC compiles expressions self contained.   That's simple and fast to compile,   but a lot of code for loading of args & saving of results is created.   Many other compiler produce far better code for such situations.   > Does anybody use it on MacOS on a daily basis? With Apple Silicon? Sorry, i have no idea.> Does hardware floating point work fine in float and double precision> on Intel x86, x86_64, and on Apple Silicon?Should work and should produce correct results(i made my tests on linux  x86_64 / x86)but see above (self contained expressions: very likely slower code)> Also: are there plans to support OpenMP,No.  The TinyCC codebase should stay as simple as possible.Creating a parallel version of a loop requires a deep analyse of the code,which is too complex for TinyCC.> The thing is that all recent CPUs are multicore,> and you are sort of wasting them if you don't parallelize costly loops...TinyCC does not fully support all C11 features yet.I use the "C11threads" package in some of my code (on top of pthread)(other packages with similar code is available online),but when using threads,you have to think about parallel execution in all of your code.TinyCC is so much faster than other compiler, that TinyCC is usedas a backend for a different language (vlang),when the v code is trans-compiled to C.(tcc is used, when vlang compiles in DEBUG mode,and clang is used otherwise).(from the vlang repository: tcc: 500k loc/s, clang: 100k/s)my test on my machine for v.c (6418031 byte)tcc: 0.233s  (680k lin/s)gcc -O0: 7.999sclang -O0:  3.779s-- Regards ... Detlef

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Questions about the future of TinyCC

2024-04-04 Thread Ces VLC
Thank you very much, David,

I think I should have omitted my preference for OpenMP, because, after all,
writing a pthreads alternative for an OpenMP parallel loop is quite
straightforward. Thus, my most important points are if there are people
using TinyCC on MacOS frequently with both Intel and Apple Silicon
architectures, as well as the feasibility of adopting TinyCC as a good
alternative valid for production use. Also, it would be good to know the
current status of the relicensing effort (I saw that in a document in the
distribution there's a list with almost all people having replied
affirmatively, one replied negatively -which seems to affect one file only,
related to ARM-, and a few didn't reply).

Regarding Pelles, yes, I saw it the times I've did a search for C
compilers, but, AFAIK, it's Windows-only and Intel-only, so it doesn't fit
my needs...

Kind regards, and thanks a lot,

César


On Mon, Apr 1, 2024 at 12:43 PM Ces VLC  wrote:

> Hi!
>
> I develop in C for Linux (Intel), Mac (Intel and soon also Apple Silicon),
> and for Windows (Intel). With the years I'm becoming more and more
> reluctant to GCC and LLVM, which are the two compilers I use, because they
> have grown into C++ monsters and building them is a huge adventure that
> takes more and more effort -days or even weeks in some cases- in every new
> version they release (I won't go into the details, but if you are used to
> build and test new versions of GCC and LLVM for several targets, you know
> what I'm talking about).
>
> Basically, what I need is just a C compiler. Written in C. A good C
> compiler. With a not too complex code tree and reasonably easy to port to
> new targets in the future. That's it.
>
> It seems the old "portable C compiler" is either gone or abandoned (the
> website is down). Another historical one, Amsterdam Toolkit (ATK) is not
> maintained for new targets such as Apple Silicon. The same can be said for
> LCC and OpenWatcom... and then, looking at the list of C compilers in
> Wikipedia, it seems like I already mentioned all the available open source
> and multiplatform C compilers but TinyCC.
>
> TinyCC looks very appealing to me, but, before I embark on it, are there
> any important warnings I should be aware of? Does anybody use it on MacOS
> on a daily basis? With Apple Silicon? Does hardware floating point work
> fine in float and double precision on Intel x86, x86_64, and on Apple
> Silicon?
>
> Also: are there plans to support OpenMP, or do you know of any tool that I
> can use for parsing a C source with OpenMP pragmas and generating a
> pthreads version of the parallelized code that I can then build with
> TinyCC? The thing is that all recent CPUs are multicore, and you are sort
> of wasting them if you don't parallelize costly loops... and OpenMP lets
> you do this in a very convenient way. Maybe a complete OpenMP
> implementation would increase the complexity of TinyCC (I'm not really
> sure, I don't know the details), that's why I'm asking for an alternative
> that I could use, a sort of "OpenMP preprocessor" before sending the source
> to TinyCC.
>
> Another thing that could be important to me is the license. The current
> LGPL might be fine, but I'd like to have at least a "static link exception"
> so that, in the case that I need to statically link TinyCC with any of my
> programs in the future, the license is not viral into my program. I've seen
> that there's an effort in relicensing TinyCC into a MIT-like license, how
> is it going? Will it succeed?
>
> Kind regards, and thanks a lot,
>
> César
>
>
>
>
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel