[PATCH] D24998: Add a new optimization option -Og

2017-11-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In https://reviews.llvm.org/D24998#932061, @torarnv wrote: > This seems to have hit a recent Xcode toolchain (Xcode 9.1 ?). > > Xcode now complains that "[app name] was compiled with optimization - > stepping may behave oddly; variables may not be available.", when launc

[PATCH] D24998: Add a new optimization option -Og

2017-11-21 Thread Tor Arne Vestbø via Phabricator via cfe-commits
torarnv added a comment. This seems to have hit a recent Xcode toolchain (Xcode 9.1 ?). Xcode now complains that "[app name] was compiled with optimization - stepping may behave oddly; variables may not be available.", when launching a debug session, which seems to be the case, debugging is all

[PATCH] D24998: Add a new optimization option -Og

2016-11-11 Thread Renato Golin via cfe-commits
rengolin accepted this revision. rengolin added a comment. This revision is now accepted and ready to land. I agree with Keith. This is a starting point, not a final destination. As we evolve this, we can start looking at better ways to improve the debug illusion, but right now, `O1` is probably

[PATCH] D24998: Add a new optimization option -Og

2016-11-07 Thread Sylvestre Ledru via cfe-commits
sylvestre.ledru updated this revision to Diff 77023. Herald added a subscriber: mehdi_amini. https://reviews.llvm.org/D24998 Files: docs/CommandGuide/clang.rst lib/Frontend/CompilerInvocation.cpp test/Preprocessor/init.c Index: test/Preprocessor/init.c

[PATCH] D24998: Add a new optimization option -Og

2016-10-05 Thread Keith Walker via cfe-commits
keith.walker.arm added a comment. Looking into what optimisations would be relevant to -Og (or rather what optimisation should be omitted because they are too disruptive to the debug experience) is something that I have on my road-map as something to look into and gather feedback on. I agree t

[PATCH] D24998: Add a new optimization option -Og

2016-10-04 Thread Paul Robinson via cfe-commits
probinson added a comment. As Renato points out, this addresses the user experience of tripping over the lack of -Og, however it does not really address the intent of PR20765 which is to provide a mode of optimizations that don't particularly interfere with debugging. Eventually someone needs t

[PATCH] D24998: Add a new optimization option -Og

2016-10-04 Thread David Blaikie via cfe-commits
dblaikie added inline comments. > debug-options.c:21-22 > > +// RUN: %clang -### -c -Og -g %s -target x86_64-linux-gnu 2>&1 \ > +// RUN: | FileCheck -check-prefix=G -check-prefix=G_GDB %s > + I don't think we need this test case: -Og doesn't actually have anything to do with -g me

[PATCH] D24998: Add a new optimization option -Og

2016-10-04 Thread Renato Golin via cfe-commits
rengolin added reviewers: echristo, dberlin, keith.walker.arm. rengolin added a comment. Hi Sylvestre, Paul's comments on the bug are still pertinent: `-Og` is not the same as `-O1`. `-Og` means for "optimised for debuggers" which is short for "preserve the debug illusion without bloating the c

Re: [PATCH] D24998: Add a new optimization option -Og

2016-09-27 Thread Sylvestre Ledru via cfe-commits
sylvestre.ledru updated this revision to Diff 72759. sylvestre.ledru added a comment. with the full context + clang format https://reviews.llvm.org/D24998 Files: docs/CommandGuide/clang.rst lib/Frontend/CompilerInvocation.cpp test/Driver/debug-options.c test/Preprocessor/init.c Index:

Re: [PATCH] D24998: Add a new optimization option -Og

2016-09-27 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Please include full context with your diff. Comment at: lib/Frontend/CompilerInvocation.cpp:101-103 @@ -100,1 +100,5 @@ +if (S == "g") { +return 1; +} + Please clang-format this.

[PATCH] D24998: Add a new optimization option -Og

2016-09-27 Thread Sylvestre Ledru via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a reviewer: rengolin. sylvestre.ledru added a subscriber: cfe-commits. Just like gcc, we should have the -Og option as more and more software are using it: https://llvm.org/bugs/show_bug.cgi?id=20765 https://reviews.llvm.org/D24998 Fi