[cfe-dev] SSA form in Clang

Hayden Livingston halivingston at gmail.com
Mon May 4 23:07:16 PDT 2015


I get it and agree. However, there is valuable information to be had
at the source level. I realized that after looking through all the
code that goes into identifying loops in LLVM IR. We already know
we're in a loop at the source code level, I fail to understand why
more work isn't done at the clang level.

Though things you have identified are also (probably more) useful things to do.

On Mon, May 4, 2015 at 1:47 AM, James Courtier-Dutton
<james.dutton at gmail.com> wrote:
> On 1 May 2015 at 10:58, Hayden Livingston <halivingston at gmail.com> wrote:
>> For my project (a subset of C) I'm trying to do optimizations at the
>> source level language and wondering why Clang doesn't have an SSA form
>> representation.
>>
>> Is it not useful, since LLVM does almost all the optimizations?
>
> I am wondering why you would want to do that?
> Source code should be optimized for readability and maintainability by
> humans, and not necessarily optimized for performance.
> LLVM does performance optimizations that would make the resulting C
> source code much less readable.
>
> Something called "re-factoring" is normally a useful thing to do at
> the source code level, resulting in source code that is easier to
> maintain.
> Another area might be analyzing the source code and recognising areas
> that can be multi-threaded, thus improving performance that way.
> Analyzing the source code and identifying areas likely to cause deadlocks.
> Essentially, useful things to check for that a compiler does not do.
>
> Kind Regards
>
> James



More information about the cfe-dev mailing list