I would like to individually disable the command line options which -O2
adds over -O1
in Clang (with the LLVM backend)
I was able to identify which flags -O2
enables over -O1
using on this post: Clang optimization levels
Flags -O2
adds: -inline -mldst-motion -gvn -globaldce -constmerge -slp-vectorizer -elim-avail-extern
How do I disable those flags individually?
(-disable-slp-vectorized
worked but what about flags like -gvn -globaldce
? I haven't been able to find a way to disable them.)