From f1d8ff96ce1728eeea6a72143fd24cd2dcd3c1e2 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 3 Nov 2011 16:08:19 -0700 Subject: [PATCH] Remove (unused) IfStmt::doAnyCheck. --- stmt.cpp | 6 ++---- stmt.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/stmt.cpp b/stmt.cpp index 65e895ff..cb547a55 100644 --- a/stmt.cpp +++ b/stmt.cpp @@ -428,9 +428,8 @@ DeclStmt::EstimateCost() const { IfStmt::IfStmt(Expr *t, Stmt *ts, Stmt *fs, bool checkCoherence, SourcePos p) : Stmt(p), test(t), trueStmts(ts), falseStmts(fs), doAllCheck(checkCoherence && - !g->opt.disableCoherentControlFlow), - doAnyCheck(test->GetType() != NULL && - test->GetType()->IsVaryingType()) { + !g->opt.disableCoherentControlFlow) { + // have to wait until after type checking to initialize doAnyCheck. } @@ -849,7 +848,6 @@ IfStmt::emitVaryingIf(FunctionEmitContext *ctx, llvm::Value *ltest) const { ctx->EndIf(); } else { - assert(doAnyCheck); llvm::BasicBlock *bDone = ctx->CreateBasicBlock("if_done"); emitMaskMixed(ctx, oldMask, ltest, bDone); ctx->SetCurrentBasicBlock(bDone); diff --git a/stmt.h b/stmt.h index 21d94420..bacb8efb 100644 --- a/stmt.h +++ b/stmt.h @@ -136,7 +136,6 @@ private: active program instances want to follow just one of the 'true' or 'false' blocks. */ const bool doAllCheck; - const bool doAnyCheck; void emitMaskedTrueAndFalse(FunctionEmitContext *ctx, llvm::Value *oldMask, llvm::Value *test) const;