From 958d329cfd52dd9a1f3e1ca21c1ac40c7114ea63 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 14 Sep 2017 00:16:25 -0700 Subject: [PATCH] edits --- src/ASTAnalyses/Encoding/encodinggraph.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ASTAnalyses/Encoding/encodinggraph.cc b/src/ASTAnalyses/Encoding/encodinggraph.cc index 4fdc1c6..3e8eec5 100644 --- a/src/ASTAnalyses/Encoding/encodinggraph.cc +++ b/src/ASTAnalyses/Encoding/encodinggraph.cc @@ -41,6 +41,7 @@ void EncodingGraph::buildGraph() { } } bsdqsort(edgeVector.expose(), edgeVector.getSize(), sizeof(EncodingEdge *), sortEncodingEdge); + decideEdges(); } void EncodingGraph::mergeNodes(EncodingNode *first, EncodingNode *second) { @@ -142,14 +143,18 @@ void EncodingGraph::decideEdges() { uint size=edgeVector.getSize(); for(uint i=0; iencoding != EDGE_UNASSIGNED) + EncodingNode *left = ee->left; + EncodingNode *right = ee->right; + + if (ee->encoding != EDGE_UNASSIGNED || + left->encoding != BINARYINDEX || + right->encoding != BINARYINDEX) continue; uint64_t eeValue = ee->getValue(); if (eeValue == 0) return; - EncodingNode *left = ee->left; - EncodingNode *right = ee->right; + EncodingSubGraph *leftGraph = graphMap.get(left); EncodingSubGraph *rightGraph = graphMap.get(right); if (leftGraph == NULL && rightGraph !=NULL) { -- 2.34.1