<p dir="ltr"><br>
On Jul 31, 2015 7:27 AM, "Robinson, Paul" <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br>
><br>
> People ask about this from time to time, but we've never done anything about it.<br>
><br>
> 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.</p>
<p dir="ltr">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.</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">><br>
> --paulr<br>
><br>
> <br>
><br>
> 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>
> Sent: Wednesday, July 29, 2015 10:13 AM<br>
> To: Dan Walmsley; cfe-dev Developers<br>
><br>
> Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?<br>
><br>
> <br>
><br>
> <br>
><br>
> <br>
><br>
> On Wed, Jul 29, 2015 at 8:42 AM, Dan Walmsley <<a href="mailto:dan@walms.co.uk">dan@walms.co.uk</a>> wrote:<br>
><br>
> Thanks,<br>
><br>
> <br>
><br>
> Perhaps there might be some documentation somewhere that would give me an idea of which optimizations to enable individually?<br>
><br>
><br>
> 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>
><br>
> - Dave<br>
> <br>
>><br>
>> <br>
>><br>
>> Dan<br>
>><br>
>> ________________________________<br>
>><br>
>> Date: Wed, 29 Jul 2015 06:40:06 -0700<br>
>> Subject: Re: [cfe-dev] Clangs equivalent to GCCs -Og flag?<br>
>> From: <a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a><br>
>> To: <a href="mailto:dan@walms.co.uk">dan@walms.co.uk</a><br>
>> CC: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>><br>
>> <br>
>><br>
>><br>
>> On Jul 29, 2015 3:23 AM, "Dan Walmsley" <<a href="mailto:dan@walms.co.uk">dan@walms.co.uk</a>> wrote:<br>
>> ><br>
>> > GCC has a debug level flag of -Og which enables all optimizers that won't degrade the debugging experience greatly.<br>
>> ><br>
>> > Does clang have an equivalent?<br>
>><br>
>> No, clang had no equivalent at this time.<br>
>><br>
>> ><br>
>> > Thanks in advance.<br>
>> ><br>
>> > Dan<br>
>> ><br>
>> > _______________________________________________<br>
>> > cfe-dev mailing list<br>
>> > <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
>> ><br>
><br>
> </p>