From 0946ccd1e58c1f1da31ddbca67c5b6301ac8b255 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 11 Nov 2008 07:41:27 +0000 Subject: short circuit && and || when possible. This substantially reduces the size of the -O0 output on some cases. For example, on expr.c from 176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed references to two external symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59034 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index a454cece40..04d64e4ee1 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -513,7 +513,13 @@ public: // Internal Helpers //===--------------------------------------------------------------------===// + /// ContainsLabel - Return true if the statement contains a label in it. If + /// this statement is not executed normally, it not containing a label means + /// that we can just remove the code. + static bool ContainsLabel(const Stmt *S, bool IgnoreCaseStmts = false); + private: + /// EmitIndirectSwitches - Emit code for all of the switch /// instructions in IndirectSwitches. void EmitIndirectSwitches(); -- cgit v1.2.3