[cfe-users] Clang optimization options with out dead code elimination?

2019-12-19 Thread Guofeng Zhang via cfe-users
Hi, We use clang 8+. Does clang have options (not -O0) that do not remove dead code when clang optimize the code? We have a old project, now migrating to Clang. It works well with -O0, but failed when use -O1 to -O3. Thanks, Guofeng ___ cfe-users mail

Re: [cfe-users] Clang optimization options with out dead code elimination?

2019-12-19 Thread David Blaikie via cfe-users
There are lots of reasons a program might fail to do what's desired when optimized - dead code is only one of them, any reason to believe that's the issue at hand? But no, LLVM doesn't really have any support for that. You might try running your program using the various sanitizersn (address, memo