[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] inline assembly and optimization passes

From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] inline assembly and optimization passes
Date: Sat, 21 Sep 2013 14:36:50 +0200
User-agent: KMail/4.10.5 (Linux/3.10-2-amd64; KDE/4.10.5; x86_64; ; )

Le samedi 21 septembre 2013 00:02:58 Jared Maddox a écrit :
> > Date: Fri, 20 Sep 2013 15:50:28 +0200
> > From: Thomas Preud'homme <address@hidden>
> > To: address@hidden
> > Subject: Re: [Tinycc-devel] inline assembly and optimization passes
> > Message-ID: <address@hidden>
> > Content-Type: text/plain; charset="iso-8859-1"
> > 
> > Le vendredi 20 septembre 2013 03:08:10 Sylvain BERTRAND a ?crit :
> >> Hi,
> >> 
> >> ----
> >> 
> >> I wonder if the internals of tinycc can easily supports basic
> >> optimization passes. The idea is not to compete with gcc and its
> >> hundred of passes, but my guess is that very few optimization
> >> passes would be required to give a significant performance boost
> >> to generated code. Just need to select the "right" ones...
> >> 
> >> As a C writer, I have been thinking about the "variable aliasing"
> >> pass over a compilation unit. Because a lot of code use many C
> >> variables to reference the same actual variable to make code more
> >> readable. Then in my ignorant mind I see a lot of wasted
> >> registers and stack space and a significant performance loss at a
> >> global scale. Wrong?
> > 
> > I'm not familiar with optimization but I would guess it would have a non
> > negligeable impact on tcc's performance. If you want basic optimization
> > you
> > could try -O1 switch of gcc or clang. Unless the cost of an optimization
> > is
> > negligeable, I think adding it to tcc is not a good idea. Many people are
> > interested in tcc because of its fast compilation so I would say it's more
> > important to keep it fast than to make the generated code better.

Indeed, I'm not opposed to such an additional target. It wouldn't increase the 
weight of tcc as only one target at a time is possible.

> So the GCC C compiler even depends on C++ features now? I had thought
> they were planning to keep the "core" set of compilers as C-based. A
> shame.

Yes, see http://lwn.net/Articles/542457/

> It probably is worth noting at this point that every once in a while
> someone comes along proposing that TCC add a C++ compiler, or at least
> some features. Obviously such a thing hasn't been done, but it does
> sometimes get proposed. And I at least think that you could get a
> pretty good language if you wrote down all of C++'s features, threw
> away the standard, and reworked the language to be less messy...

I'm not sure what is your point. Are you suggesting we add the support for 
some kind of C++-ng language?

Best regards,


Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]