From 1148a2d0d1ce43ab89e14eefb70bc410726838c4 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 10 Mar 2020 07:14:42 +0100 Subject: document new environment variables and code format --- llvm_mode/MarkNodes.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'llvm_mode/MarkNodes.cc') diff --git a/llvm_mode/MarkNodes.cc b/llvm_mode/MarkNodes.cc index b8587826..cff6c90a 100644 --- a/llvm_mode/MarkNodes.cc +++ b/llvm_mode/MarkNodes.cc @@ -393,10 +393,9 @@ bool MarkSubGraph(uint32_t ss, uint32_t tt) { MakeUniq(TopoOrder[i]); } - - // Check if there is an empty path. - if (NextMarked[tt].count(TopoOrder[0]) > 0) - return true; + + // Check if there is an empty path. + if (NextMarked[tt].count(TopoOrder[0]) > 0) return true; return false; } @@ -422,7 +421,7 @@ void MarkVertice() { timeStamp = 0; uint32_t t = 0; - bool emptyPathExists = true; + bool emptyPathExists = true; while (s != t) { @@ -430,10 +429,12 @@ void MarkVertice() { t = DominatorTree::idom[t]; } - + if (emptyPathExists) { + // Mark all exit blocks to catch the empty path. Marked.insert(t_Pred[0].begin(), t_Pred[0].end()); + } } -- cgit 1.4.1