[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-09-16 Thread amohr at amohr dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #15 from Alex Mohr --- Thank you Richard B, Richard G, Xi, Jonathan, Jakub, and Eric for all the great info. Much appreciated. With more experience using '-Og -fno-inline' I've found that sometimes inspecting local variables

[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-09-01 Thread amohr at amohr dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #10 from Alex Mohr --- (In reply to Xi Ruoyao from comment #9) > I believe the only real issue is imprecise documentation: "It is a better > choice than -O0" has some caveats and it's not always true. Is there a way to explicitly

[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-09-01 Thread amohr at amohr dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #8 from Alex Mohr --- (In reply to Jonathan Wakely from comment #5) > A 4x slowdown isn't really acceptable IMHO. At that point, why not just use > -O0 instead? I've been using -O0 for years. I was trying to move to -Og because of

[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-08-31 Thread amohr at amohr dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #2 from Alex Mohr --- Thanks much for looking at this, Richard. I definitely understand what you're driving at with regard to stepping into lots of C++ abstraction stuff. But I think it gets blurry trying to distinguish what's

[Bug c++/111243] New: The -Og option inlines functions, making for a poor debugging experience.

2023-08-30 Thread amohr at amohr dot org via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: amohr at amohr dot org Target Milestone: --- The docs recommend using -Og for debug builds, but that option inlines functions which makes single-stepping in debuggers

[Bug rtl-optimization/82803] Wildly excessive calls to __tls_get_addr with optimizations enabled.

2017-11-02 Thread amohr at amohr dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82803 --- Comment #3 from Alex Mohr --- FWIW a loop is not required. This generates 4 calls to __tls_get_addr: static thread_local int x; int g(); int f() { int *px = if (g()) *px += g(); if (g()) *px += g(); if (g()) *px += g(); return

[Bug c++/82803] New: Wildly excessive calls to __tls_get_addr with optimizations enabled.

2017-11-02 Thread amohr at amohr dot org
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: amohr at amohr dot org Target Milestone: --- gcc emits a call to __tls_get_addr for every iteration of the while loop below at -O1 or above. It does not happen at -O0. static