Mehdi Amini via llvm-dev
2016-Mar-15 22:20 UTC
[llvm-dev] RelWithDebInfo vs Release optimization level?
Hi all, These two cmake configuration are using different optimization levels (O2 vs O3). What is the rational for that? I know that O1 is "supposingly" more friendly for debugging, but I don't think we make such claim for O2 vs O3, are we? I'd expect RelWithDebInfo to be what the name says, i.e. Release + debug-information. -- Mehdi
Duncan P. N. Exon Smith via llvm-dev
2016-Mar-15 23:44 UTC
[llvm-dev] RelWithDebInfo vs Release optimization level?
I also assumed they were the same, and I have been using them that way. I agree they should match.> On 2016-Mar-15, at 15:20, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > These two cmake configuration are using different optimization levels (O2 vs O3). What is the rational for that? I know that O1 is "supposingly" more friendly for debugging, but I don't think we make such claim for O2 vs O3, are we? > > I'd expect RelWithDebInfo to be what the name says, i.e. Release + debug-information. > > > -- > Mehdi > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Chris Bieneman via llvm-dev
2016-Mar-16 03:36 UTC
[llvm-dev] RelWithDebInfo vs Release optimization level?
The default values for the optimization level are provided by CMake. My stab in the dark here is that the difference originates as a behavior matching Visual Studio. Historically VS lowered optimization to -O2 if you built with debug info because the -O3 builds were basically undebugable. Changing this default in our CMake configurations might be tricky and error prone because there isn't a good way to know that the variable isn't set by the user. This is basically the perennial CMake cache invalidation problem. -Chris> On Mar 15, 2016, at 4:44 PM, Duncan P. N. Exon Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I also assumed they were the same, and I have been using them > that way. I agree they should match. > >> On 2016-Mar-15, at 15:20, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi all, >> >> These two cmake configuration are using different optimization levels (O2 vs O3). What is the rational for that? I know that O1 is "supposingly" more friendly for debugging, but I don't think we make such claim for O2 vs O3, are we? >> >> I'd expect RelWithDebInfo to be what the name says, i.e. Release + debug-information. >> >> >> -- >> Mehdi >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Possibly Parallel Threads
- Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
- Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
- Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
- Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"
- Question about LLVM Building Error with "-DLLVM_ENABLE_DUMP" and "RelWithDebInfo"