diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-11-01 10:47:43 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-07 14:28:18 +0000 |
commit | 1ae353c887fdf447e1fe627e3cd29f8fa62c2a05 (patch) | |
tree | a9d31f9c1b75efe0b543e15730432b938f2ebce7 /src/sksl/SkSLCFGGenerator.h | |
parent | 427293c17ee807d014158990770a6efad9a9a4e6 (diff) |
refactored SkSLVarDeclaration out of existence
Bug: skia:
Change-Id: I3dbc08e6d759f6828a472246d4797babb6cc132e
Reviewed-on: https://skia-review.googlesource.com/66147
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLCFGGenerator.h')
-rw-r--r-- | src/sksl/SkSLCFGGenerator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sksl/SkSLCFGGenerator.h b/src/sksl/SkSLCFGGenerator.h index 885d9261ec..3fe0d2a47e 100644 --- a/src/sksl/SkSLCFGGenerator.h +++ b/src/sksl/SkSLCFGGenerator.h @@ -96,6 +96,14 @@ struct BasicBlock { bool tryRemoveExpressionBefore(std::vector<BasicBlock::Node>::iterator* iter, Expression* e); /** + * Locates and attempts remove an expression occurring after the expression pointed to by iter. + * If the expression can be cleanly removed, returns true and resets iter to a valid iterator + * pointing to the same expression it did initially. Otherwise returns false (and the CFG will + * need to be regenerated). + */ + bool tryRemoveExpressionAfter(std::vector<BasicBlock::Node>::iterator* iter, Expression* e); + + /** * As tryRemoveExpressionBefore, but for lvalues. As lvalues are at most partially evaluated * (for instance, x[i] = 0 evaluates i but not x) this will only look for the parts of the * lvalue that are actually evaluated. |