Generate more efficient for regular varying 'if' statements.

For the case where we have a regular (i.e. non-'cif') 'if' statement,
the generated code just simply checks to see if any program instance
is running before running the corresponding statements.  This is a
lighter-weight check than IfStmt::emitMaskMixed() was performing.
This commit is contained in:
Matt Pharr
2011-09-16 12:03:42 -07:00
parent 1dedd88132
commit 173632f446
2 changed files with 42 additions and 11 deletions

1
stmt.h
View File

@@ -126,6 +126,7 @@ 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;