[PATCH] D27560: Always run GlobalDCE at O0

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 17:47:27 PST 2016


> On 2016-Dec-13, at 17:43, Chandler Carruth <chandlerc at google.com> wrote:
> 
> On Tue, Dec 13, 2016 at 5:33 PM Duncan P. N. Exon Smith via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> I agree that ideally we would teach Clang not to emit the code, but last I checked -O0 has a number of IR-modifying passes thanks to the sanitizers.
> 
> Not unless those sanitizers are enabled? I think the always inliner is the big one here...
>  
>   To understand how the frontend is (mis)behaving, I think you already need -mllvm -disable-llvm-passes.
> 
> Yes, I'm talking about testing whether LLVM is misbehaving which is different? Note that the patch changes the *opt* -O0, not just Clang.

Ah, I'd conflated LLVM and Clang (and I'd forgotten that opt was part of the patch).  I wonder if we could add such a flag to opt, which would fix the always inliner case too?  Or should we have a separate tool for reading/dumping IR and doing nothing?  (llvm-as|llvm-dis in a single process)

>  
> 
> > On 2016-Dec-13, at 17:25, Chandler Carruth via Phabricator <reviews at reviews.llvm.org> wrote:
> >
> > chandlerc added a comment.
> >
> > Personally, I would much rather teach Clang to not emit code than run a pass at O0. I really would like to preserve the ability to use O0 to understand why LLVM is misbehaving.
> >
> > (The fact that we need to run the always inliner at O0 is already somewhat frustrating, I think it makes sense to resist worsening that situation.)
> >
> >
> > https://reviews.llvm.org/D27560
> >
> >
> >
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list