[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?
From:       David Blaikie <dblaikie () gmail ! com>
Date:       2015-07-31 14:37:00
Message-ID: CAENS6EuowWYBr7LcfYovs3LbddGbi3nG__GLR=4YZRxS4z9Uqw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Jul 31, 2015 7:27 AM, "Robinson, Paul" <
Paul_Robinson@playstation.sony.com> wrote:
>
> People ask about this from time to time, but we've never done anything
about it.
>
> One thing I noticed about GCC –Og is that it's 99% identical to their
–O1.  I'd be curious about people's experience using Clang –O1 –g and
whether that experience is somewhere close to reasonable.

It's still likely to be not great for debugging - mostly because it still
runs SROA which promotes allocas into registers and out variable
liveness/tracking falls down quickly there.

Chandlers repeatedly suggested that we fix debug info to the point that -O1
is highly debuggable (might involve changing -O1 too, if there are
fundamentally destructive things in there that hurt debugging) and then
make that the default (because its often as fast or faster than compiling
at -O1 anyway, which is what people usually care about - compile time and
simplicity/understandability)

>
> --paulr
>
>
>
> From: cfe-dev-bounces@cs.uiuc.edu [mailto:cfe-dev-bounces@cs.uiuc.edu] On
Behalf Of David Blaikie
> Sent: Wednesday, July 29, 2015 10:13 AM
> To: Dan Walmsley; cfe-dev Developers
>
> Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?
>
>
>
>
>
>
>
> On Wed, Jul 29, 2015 at 8:42 AM, Dan Walmsley <dan@walms.co.uk> wrote:
>
> Thanks,
>
>
>
>     Perhaps there might be some documentation somewhere that would give
me an idea of which optimizations to enable individually?
>
>
> Not really - optimized debug info is still pretty lacking in Clang. Even
the most common/basic optimizations (SROA, for example) are going to pretty
heavily impact debuggability today.
>
> - Dave
>
>>
>>
>>
>> Dan
>>
>> ________________________________
>>
>> Date: Wed, 29 Jul 2015 06:40:06 -0700
>> Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?
>> From: dblaikie@gmail.com
>> To: dan@walms.co.uk
>> CC: cfe-dev@cs.uiuc.edu
>>
>>
>>
>>
>> On Jul 29, 2015 3:23 AM, "Dan Walmsley" <dan@walms.co.uk> wrote:
>> >
>> > GCC has a debug level flag of -Og which enables all optimizers that
won't degrade the debugging experience greatly.
>> >
>> > Does clang have an equivalent?
>>
>> No, clang had no equivalent at this time.
>>
>> >
>> > Thanks in advance.
>> >
>> > Dan
>> >
>> > _______________________________________________
>> > cfe-dev mailing list
>> > cfe-dev@cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>> >
>
>

[Attachment #5 (text/html)]

<p dir="ltr"><br>
On Jul 31, 2015 7:27 AM, &quot;Robinson, Paul&quot; &lt;<a \
href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>&gt; \
wrote:<br> &gt;<br>
&gt; People ask about this from time to time, but we&#39;ve never done anything about \
it.<br> &gt;<br>
&gt; One thing I noticed about GCC –Og is that it&#39;s 99% identical to their \
–O1.   I&#39;d be curious about people&#39;s experience using Clang –O1 –g and \
whether that experience is somewhere close to reasonable.</p> <p dir="ltr">It&#39;s \
still likely to be not great for debugging - mostly because it still runs SROA which \
promotes allocas into registers and out variable liveness/tracking falls down quickly \
there.</p> <p dir="ltr">Chandlers repeatedly suggested that we fix debug info to the \
point that -O1 is highly debuggable (might involve changing -O1 too, if there are \
fundamentally destructive things in there that hurt debugging) and then make that the \
default (because its often as fast or faster than compiling at -O1 anyway, which is \
what people usually care about - compile time and simplicity/understandability)</p> \
<p dir="ltr">&gt;<br> &gt; --paulr<br>
&gt;<br>
&gt;   <br>
&gt;<br>
&gt; From: <a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a> \
[mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a>] \
On Behalf Of David Blaikie<br> &gt; Sent: Wednesday, July 29, 2015 10:13 AM<br>
&gt; To: Dan Walmsley; cfe-dev Developers<br>
&gt;<br>
&gt; Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?<br>
&gt;<br>
&gt;   <br>
&gt;<br>
&gt;   <br>
&gt;<br>
&gt;   <br>
&gt;<br>
&gt; On Wed, Jul 29, 2015 at 8:42 AM, Dan Walmsley &lt;<a \
href="mailto:dan@walms.co.uk">dan@walms.co.uk</a>&gt; wrote:<br> &gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt;   <br>
&gt;<br>
&gt;        Perhaps there might be some documentation somewhere that would give me an \
idea of which optimizations to enable individually?<br> &gt;<br>
&gt;<br>
&gt; Not really - optimized debug info is still pretty lacking in Clang. Even the \
most common/basic optimizations (SROA, for example) are going to pretty heavily \
impact debuggability today.<br> &gt;<br>
&gt; - Dave<br>
&gt;   <br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;<br>
&gt;&gt; Dan<br>
&gt;&gt;<br>
&gt;&gt; ________________________________<br>
&gt;&gt;<br>
&gt;&gt; Date: Wed, 29 Jul 2015 06:40:06 -0700<br>
&gt;&gt; Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?<br>
&gt;&gt; From: <a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a><br>
&gt;&gt; To: <a href="mailto:dan@walms.co.uk">dan@walms.co.uk</a><br>
&gt;&gt; CC: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
&gt;&gt;<br>
&gt;&gt;   <br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Jul 29, 2015 3:23 AM, &quot;Dan Walmsley&quot; &lt;<a \
href="mailto:dan@walms.co.uk">dan@walms.co.uk</a>&gt; wrote:<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; GCC has a debug level flag of -Og which enables all optimizers that \
won&#39;t degrade the debugging experience greatly.<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; Does clang have an equivalent?<br>
&gt;&gt;<br>
&gt;&gt; No, clang had no equivalent at this time.<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks in advance.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Dan<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; cfe-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
&gt;&gt; &gt; <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
 &gt;&gt; &gt;<br>
&gt;<br>
&gt;   </p>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic