Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1175)

Unified Diff: src/sksl/SkSLCompiler.h

Issue 2405383003: added basic dataflow analysis to skslc (Closed)
Patch Set: I have no idea what I was thinking Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sksl/SkSLCFGGenerator.cpp ('k') | src/sksl/SkSLCompiler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/SkSLCompiler.h
diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h
index 96ae7d06bcc96f0e0631c49c4183028e59c6431b..275fc58b3f15cb95d199d51a6f38003b84459ca3 100644
--- a/src/sksl/SkSLCompiler.h
+++ b/src/sksl/SkSLCompiler.h
@@ -8,9 +8,11 @@
#ifndef SKSL_COMPILER
#define SKSL_COMPILER
+#include <set>
#include <vector>
#include "ir/SkSLProgram.h"
#include "ir/SkSLSymbolTable.h"
+#include "SkSLCFGGenerator.h"
#include "SkSLContext.h"
#include "SkSLErrorReporter.h"
#include "SkSLGLSLCodeGenerator.h"
@@ -52,6 +54,15 @@ public:
void writeErrorCount();
private:
+ void addDefinition(const Expression* lvalue, const Expression* expr,
+ std::unordered_map<const Variable*, const Expression*>* definitions);
+
+ void addDefinitions(const BasicBlock::Node& node,
+ std::unordered_map<const Variable*, const Expression*>* definitions);
+
+ void scanCFG(CFG* cfg, BlockId block, std::set<BlockId>* workList);
+
+ void scanCFG(const FunctionDefinition& f);
void internalConvertProgram(std::string text,
Modifiers::Flag* defaultPrecision,
« no previous file with comments | « src/sksl/SkSLCFGGenerator.cpp ('k') | src/sksl/SkSLCompiler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698