Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995607
dfapass.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 7, 4:39 PM
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Jul 9, 4:39 PM (1 d, 6 h)
Engine
blob
Format
Raw Data
Handle
260784
Attached To
rXR Xreate
dfapass.h
View Options
// Data Flow Graph determination pass
#ifndef DFGPASS_H
#define DFGPASS_H
#include "abstractpass.h"
#include "analysis/dfagraph.h"
namespace xreate {
class ClaspLayer;
class DFAPass : public AbstractPass<xreate::analysis::SymbolNode> {
public:
xreate::analysis::SymbolNode process(CodeScope* scope, PassContext context, const std::string& hintBlockDecl="") override;
xreate::analysis::SymbolNode process(const Expression& expression, PassContext context, const std::string& varDecl="") override;
DFAPass(PassManager* manager);
void init();
void run();
void finish();
private:
struct
{
xreate::analysis::DFAGraph* graph;
} __context;
struct ExpressionCache{
std::vector<xreate::analysis::SymbolNode> operands;
std::vector<xreate::analysis::SymbolNode> blocks;
xreate::analysis::SymbolNode result;
};
std::map<Operator, Expression> __signatures; //DFA data for particular operators
ClaspLayer* clasp;
void processCompoundOp(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& varDecl="");
void processElementaryOp(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& varDecl="");
void applyDependencies(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& decl);
void applyInPlaceAnnotations(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& decl);
void applySignatureAnnotations(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& decl);
void applyStaticAnnotations(const Expression& expression, PassContext context, ExpressionCache& cache, const std::string& decl);
};
};
#endif
Event Timeline
Log In to Comment