[PATCH] D27560: Always run GlobalDCE at O0
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 17:59:15 PST 2016
mehdi_amini added a comment.
In https://reviews.llvm.org/D27560#621765, @chandlerc wrote:
> In https://reviews.llvm.org/D27560#621760, @mehdi_amini wrote:
> > Another reason -O0 isn't great / enough to debug when LLVM is misbehaving is that it impacts the clang codegen (lifetime intrinsics, etc.).
> But you're changing *opt*, not Clang.
> I really think that we shouldn't add passes to -O0...
Well if you expect opt -O0 to not run any pass, then it is fairly easy to achieve in opt: do not invoke the PM builder when OptLevel == 0 :)
(But that defeats the point of -O0 in opt, it actually wouldn't do *anything*)
> I am sympathetic to wanting a developer "friendly" mode in the compiler
Note that my motivation to submit this is not that, it is a (admittedly lame) approach to fix a build failure related to us not processing always_inline functions.
More information about the llvm-commits