Remove (unused) IfStmt::doAnyCheck.

This commit is contained in:
Matt Pharr
2011-11-03 16:08:19 -07:00
parent d528533fba
commit f1d8ff96ce
2 changed files with 2 additions and 5 deletions

View File

@@ -428,9 +428,8 @@ DeclStmt::EstimateCost() const {
IfStmt::IfStmt(Expr *t, Stmt *ts, Stmt *fs, bool checkCoherence, SourcePos p) IfStmt::IfStmt(Expr *t, Stmt *ts, Stmt *fs, bool checkCoherence, SourcePos p)
: Stmt(p), test(t), trueStmts(ts), falseStmts(fs), : Stmt(p), test(t), trueStmts(ts), falseStmts(fs),
doAllCheck(checkCoherence && doAllCheck(checkCoherence &&
!g->opt.disableCoherentControlFlow), !g->opt.disableCoherentControlFlow) {
doAnyCheck(test->GetType() != NULL && // have to wait until after type checking to initialize doAnyCheck.
test->GetType()->IsVaryingType()) {
} }
@@ -849,7 +848,6 @@ IfStmt::emitVaryingIf(FunctionEmitContext *ctx, llvm::Value *ltest) const {
ctx->EndIf(); ctx->EndIf();
} }
else { else {
assert(doAnyCheck);
llvm::BasicBlock *bDone = ctx->CreateBasicBlock("if_done"); llvm::BasicBlock *bDone = ctx->CreateBasicBlock("if_done");
emitMaskMixed(ctx, oldMask, ltest, bDone); emitMaskMixed(ctx, oldMask, ltest, bDone);
ctx->SetCurrentBasicBlock(bDone); ctx->SetCurrentBasicBlock(bDone);

1
stmt.h
View File

@@ -136,7 +136,6 @@ private:
active program instances want to follow just one of the 'true' or active program instances want to follow just one of the 'true' or
'false' blocks. */ 'false' blocks. */
const bool doAllCheck; const bool doAllCheck;
const bool doAnyCheck;
void emitMaskedTrueAndFalse(FunctionEmitContext *ctx, llvm::Value *oldMask, void emitMaskedTrueAndFalse(FunctionEmitContext *ctx, llvm::Value *oldMask,
llvm::Value *test) const; llvm::Value *test) const;