From 7736cce156b34492c6c7bb4d2e5d98d612191ca3 Mon Sep 17 00:00:00 2001 From: rseac Date: Tue, 8 Oct 2024 19:34:00 +0000 Subject: [PATCH] deploy: f014deff24c6ffc2c479d39e1eeeb47809e5f372 --- SplitCFG_8cpp_source.html | 301 +++++++++------------------ SplitCFG_8h_source.html | 2 +- classsystemc__clang_1_1SplitCFG.html | 2 +- doxygen_crawl.html | 8 +- 4 files changed, 103 insertions(+), 210 deletions(-) diff --git a/SplitCFG_8cpp_source.html b/SplitCFG_8cpp_source.html index fe6a118a..d5752196 100644 --- a/SplitCFG_8cpp_source.html +++ b/SplitCFG_8cpp_source.html @@ -1290,7 +1290,7 @@
1163SplitCFG::SplitCFG(clang::ASTContext& context,
1164 const clang::CXXMethodDecl* method)
-
1165 : context_{context},
+
1165 : context_{context},
1166 next_state_count_{0},
1167 popping_{false},
1168 outter_top_(nullptr),
@@ -1313,214 +1313,107 @@
1181 std::queue<SplitCFGBlock*> Q{};
1182 std::set<SplitCFGBlock*> discovered{};
1183
- -
1185 SplitCFGBlock* target = cop_[outter_top_];
-
1186 llvm::dbgs() << "Outter ternop is BB" << outter_top->getBlockID() << " and confluence block is BB" << target->getBlockID() << "\n";
-
1187 // if (!source) v = sccfg_[cfg_->getEntry().getBlockID()];
-
1188 // else v = source;
-
1189
-
1190 discovered.insert(v);
+
1184 if (!outter_top_) return discovered;
+
1185
+ +
1187 SplitCFGBlock* target = cop_[outter_top_];
+
1188 llvm::dbgs() << "Outter ternop is BB" << outter_top_->getBlockID() << " and confluence block is BB" << target->getBlockID() << "\n";
+
1189 // if (!source) v = sccfg_[cfg_->getEntry().getBlockID()];
+
1190 // else v = source;
1191
-
1192 Q.push(v);
+
1192 discovered.insert(v);
1193
-
1194 while (!Q.empty()) {
-
1195 v = Q.front();
-
1196 Q.pop();
-
1197 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
-
1198
-
1199 for (auto succ : v->getCFGBlock()->succs()) {
-
1200 if (succ && (v->getBlockID() != target->getBlockID())) {
-
1201 auto blk{sccfg_[succ->getBlockID()]};
-
1202 if (discovered.find(blk) == discovered.end()) {
-
1203 discovered.insert(blk);
-
1204 Q.push(blk);
-
1205 }
-
1206 }
-
1207 }
-
1208 }
-
1209
-
1210 llvm::dbgs() << "Discovered\n";
-
1211 for (auto disc : discovered ) {
-
1212 llvm::dbgs() << disc->getBlockID() <<" ";
-
1213
-
1214 }
-
1215 return discovered;
-
1216}
+
1194 Q.push(v);
+
1195
+
1196 while (!Q.empty()) {
+
1197 v = Q.front();
+
1198 Q.pop();
+
1199 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
+
1200
+
1201 for (auto succ : v->getCFGBlock()->succs()) {
+
1202 if (succ && (v->getBlockID() != target->getBlockID())) {
+
1203 auto blk{sccfg_[succ->getBlockID()]};
+
1204 if (discovered.find(blk) == discovered.end()) {
+
1205 discovered.insert(blk);
+
1206 Q.push(blk);
+
1207 }
+
1208 }
+
1209 }
+
1210 }
+
1211
+
1212 llvm::dbgs() << "Discovered\n";
+
1213 for (auto disc : discovered ) {
+
1214 llvm::dbgs() << disc->getBlockID() <<" ";
+
1215
+
1216 }
+
1217 return discovered;
+
1218}
-
1217
-
- -
1219 llvm::dbgs() << "########### Identify confluence blocks ############ \n";
-
1220
-
1221 // ConditionalOperator block => Confluence Block
-
1222 // std::map<SplitFGBlock*, SplitCFGBlock*> cop_;
-
1223 std::vector<SplitCFGBlock*> ternops;
-
1224
-
1225 std::vector<SplitCFGBlock*> S{};
-
1226 std::set<SplitCFGBlock*> discovered{};
-
1227 // Do DFS whenever you reach a conditional operator block.
-
1228 SplitCFGBlock* v = sccfg_[cfg_->getEntry().getBlockID()];
-
1229
-
1230 SplitCFGBlock* outter{nullptr};
+
1219
+
+ +
1221 llvm::dbgs() << "########### Identify confluence blocks ############ \n";
+
1222
+
1223 // ConditionalOperator block => Confluence Block
+
1224 // std::map<SplitFGBlock*, SplitCFGBlock*> cop_;
+
1225 std::vector<SplitCFGBlock*> ternops;
+
1226
+
1227 std::vector<SplitCFGBlock*> S{};
+
1228 std::set<SplitCFGBlock*> discovered{};
+
1229 // Do DFS whenever you reach a conditional operator block.
+
1230 SplitCFGBlock* v = sccfg_[cfg_->getEntry().getBlockID()];
1231
-
1232 S.push_back(v);
-
1233 while (!S.empty()) {
-
1234 v = S.back();
-
1235 S.pop_back();
-
1236 if (discovered.find(v) == discovered.end()) {
-
1237 discovered.insert(v);
-
1238 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
-
1239
-
1240 // Found ConditionalOperator
-
1241 auto stmt{v->getCFGBlock()->getTerminatorStmt()};
-
1242 if (stmt && clang::dyn_cast<clang::ConditionalOperator>(stmt)) {
-
1243 llvm::dbgs() << "Found a TERNARY OP block\n";
-
1244
-
1245 if (!outter) outter = v;
+
1232 SplitCFGBlock* outter{nullptr};
+
1233
+
1234 S.push_back(v);
+
1235 while (!S.empty()) {
+
1236 v = S.back();
+
1237 S.pop_back();
+
1238 if (discovered.find(v) == discovered.end()) {
+
1239 discovered.insert(v);
+
1240 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
+
1241
+
1242 // Found ConditionalOperator
+
1243 auto stmt{v->getCFGBlock()->getTerminatorStmt()};
+
1244 if (stmt && clang::dyn_cast<clang::ConditionalOperator>(stmt)) {
+
1245 llvm::dbgs() << "Found a TERNARY OP block\n";
1246
-
1247 cop_.insert(std::make_pair(v, nullptr));
-
1248 ternops.push_back(v);
-
1249
-
1250 } else if (ternops.size() > 0) {
-
1251 auto top_cop{ternops.back()};
-
1252 // Successor is the confluence
-
1253 if (v->getCFGBlock()->succ_size() == 1) {
-
1254 auto conf_blk{*v->getCFGBlock()->succ_begin()};
-
1255 llvm::dbgs() << "Found confluence block of " << conf_blk->getBlockID()
-
1256 << " from block " << v->getBlockID() << " of "
-
1257 << top_cop->getBlockID() << "\n";
-
1258 cop_[top_cop] = sccfg_[conf_blk->getBlockID()];
-
1259
-
1260 conf_blk->dump();
-
1261 ternops.pop_back();
-
1262 }
-
1263 }
-
1264
-
1265 for (auto next_v : v->getCFGBlock()->succs()) {
-
1266 if (next_v) S.push_back(sccfg_[next_v->getBlockID()]);
-
1267 }
-
1268 }
-
1269 }
-
1270 // Print the cop map.
-
1271 llvm::dbgs() << "Block ids for COP ";
-
1272 for (auto& co : cop_) {
-
1273 llvm::dbgs() << co.first->getBlockID() << " :=> " << co.second->getBlockID()
-
1274 << " ; ";
-
1275 }
-
1276 llvm::dbgs() << "\n";
-
1277
-
1278 outter_top = outter;
-
1279}
+
1247 if (!outter) outter = v;
+
1248
+
1249 cop_.insert(std::make_pair(v, nullptr));
+
1250 ternops.push_back(v);
+
1251
+
1252 } else if (ternops.size() > 0) {
+
1253 auto top_cop{ternops.back()};
+
1254 // Successor is the confluence
+
1255 if (v->getCFGBlock()->succ_size() == 1) {
+
1256 auto conf_blk{*v->getCFGBlock()->succ_begin()};
+
1257 llvm::dbgs() << "Found confluence block of " << conf_blk->getBlockID()
+
1258 << " from block " << v->getBlockID() << " of "
+
1259 << top_cop->getBlockID() << "\n";
+
1260 cop_[top_cop] = sccfg_[conf_blk->getBlockID()];
+
1261
+
1262 conf_blk->dump();
+
1263 ternops.pop_back();
+
1264 }
+
1265 }
+
1266
+
1267 for (auto next_v : v->getCFGBlock()->succs()) {
+
1268 if (next_v) S.push_back(sccfg_[next_v->getBlockID()]);
+
1269 }
+
1270 }
+
1271 }
+
1272 // Print the cop map.
+
1273 llvm::dbgs() << "Block ids for COP ";
+
1274 for (auto& co : cop_) {
+
1275 llvm::dbgs() << co.first->getBlockID() << " :=> " << co.second->getBlockID()
+
1276 << " ; ";
+
1277 }
+
1278 llvm::dbgs() << "\n";
+
1279
+
1280 outter_top_ = outter;
+
1281}
-
1280
-
1281std::map<SplitCFGBlock*, SplitCFGBlock*> SplitCFG::getConfluenceBlocks() const {
-
1282 return cop_;
-
1283}
-
1284
-
1285std::set<SplitCFGBlock*> SplitCFG::identifySkipBlocks() {
-
1286 llvm::dbgs() << "########### BFS Identify confluence blocks ############ \n";
-
1287 std::queue<SplitCFGBlock*> Q{};
-
1288 std::set<SplitCFGBlock*> discovered{};
-
1289
-
1290 if (!outter_top_) return discovered;
-
1291
- -
1293 SplitCFGBlock* target = cop_[outter_top_];
-
1294 llvm::dbgs() << "Outter ternop is BB" << outter_top_->getBlockID() << " and confluence block is BB" << target->getBlockID() << "\n";
-
1295 // if (!source) v = sccfg_[cfg_->getEntry().getBlockID()];
-
1296 // else v = source;
-
1297
-
1298 discovered.insert(v);
-
1299
-
1300 Q.push(v);
-
1301
-
1302 while (!Q.empty()) {
-
1303 v = Q.front();
-
1304 Q.pop();
-
1305 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
-
1306
-
1307 for (auto succ : v->getCFGBlock()->succs()) {
-
1308 if (succ && (v->getBlockID() != target->getBlockID())) {
-
1309 auto blk{sccfg_[succ->getBlockID()]};
-
1310 if (discovered.find(blk) == discovered.end()) {
-
1311 discovered.insert(blk);
-
1312 Q.push(blk);
-
1313 }
-
1314 }
-
1315 }
-
1316 }
-
1317
-
1318 llvm::dbgs() << "Discovered\n";
-
1319 for (auto disc : discovered ) {
-
1320 llvm::dbgs() << disc->getBlockID() <<" ";
-
1321
-
1322 }
-
1323 return discovered;
-
1324}
-
1325
- -
1327 llvm::dbgs() << "########### Identify confluence blocks ############ \n";
-
1328
-
1329 // ConditionalOperator block => Confluence Block
-
1330 // std::map<SplitFGBlock*, SplitCFGBlock*> cop_;
-
1331 std::vector<SplitCFGBlock*> ternops;
-
1332
-
1333 std::vector<SplitCFGBlock*> S{};
-
1334 std::set<SplitCFGBlock*> discovered{};
-
1335 // Do DFS whenever you reach a conditional operator block.
-
1336 SplitCFGBlock* v = sccfg_[cfg_->getEntry().getBlockID()];
-
1337
-
1338 SplitCFGBlock* outter{nullptr};
-
1339
-
1340 S.push_back(v);
-
1341 while (!S.empty()) {
-
1342 v = S.back();
-
1343 S.pop_back();
-
1344 if (discovered.find(v) == discovered.end()) {
-
1345 discovered.insert(v);
-
1346 llvm::dbgs() << "visited " << v->getBlockID() << "\n";
-
1347
-
1348 // Found ConditionalOperator
-
1349 auto stmt{v->getCFGBlock()->getTerminatorStmt()};
-
1350 if (stmt && clang::dyn_cast<clang::ConditionalOperator>(stmt)) {
-
1351 llvm::dbgs() << "Found a TERNARY OP block\n";
-
1352
-
1353 if (!outter) outter = v;
-
1354
-
1355 cop_.insert(std::make_pair(v, nullptr));
-
1356 ternops.push_back(v);
-
1357
-
1358 } else if (ternops.size() > 0) {
-
1359 auto top_cop{ternops.back()};
-
1360 // Successor is the confluence
-
1361 if (v->getCFGBlock()->succ_size() == 1) {
-
1362 auto conf_blk{*v->getCFGBlock()->succ_begin()};
-
1363 llvm::dbgs() << "Found confluence block of " << conf_blk->getBlockID()
-
1364 << " from block " << v->getBlockID() << " of "
-
1365 << top_cop->getBlockID() << "\n";
-
1366 cop_[top_cop] = sccfg_[conf_blk->getBlockID()];
-
1367
-
1368 conf_blk->dump();
-
1369 ternops.pop_back();
-
1370 }
-
1371 }
-
1372
-
1373 for (auto next_v : v->getCFGBlock()->succs()) {
-
1374 if (next_v) S.push_back(sccfg_[next_v->getBlockID()]);
-
1375 }
-
1376 }
-
1377 }
-
1378 // Print the cop map.
-
1379 llvm::dbgs() << "Block ids for COP ";
-
1380 for (auto& co : cop_) {
-
1381 llvm::dbgs() << co.first->getBlockID() << " :=> " << co.second->getBlockID()
-
1382 << " ; ";
-
1383 }
-
1384 llvm::dbgs() << "\n";
-
1385
-
1386 outter_top_ = outter;
-
1387}
-
1388>>>>>>> scratchllnl
SuccessorIterator::const_iterator const_succ_iterator
@@ -1566,7 +1459,7 @@
void dumpPathInfo() const
Definition SplitCFG.cpp:936
void generate_paths()
Generates the paths between wait statements.
Definition SplitCFG.cpp:836
clang::ASTContext & context_
The context necessary to access translation unit.
Definition SplitCFG.h:106
-
void identifyConfluenceBlocks()
Identify confluence blocks in the CFG.
+
void identifyConfluenceBlocks()
Identify confluence blocks in the CFG.
bool getUnvisitedSuccessor(const SplitCFGBlock *curr_block, SplitCFGBlock::const_succ_iterator &I, llvm::SmallPtrSetImpl< const SplitCFGBlock * > &visited, const SplitCFGBlock *&block)
Definition SplitCFG.cpp:472
std::set< SplitCFGBlock * > identifySkipBlocks()
bool isTruePath(const SplitCFGBlock *parent_block, const SplitCFGBlock *block) const
Definition SplitCFG.cpp:419
diff --git a/SplitCFG_8h_source.html b/SplitCFG_8h_source.html index 0c699455..5cf7db34 100644 --- a/SplitCFG_8h_source.html +++ b/SplitCFG_8h_source.html @@ -404,7 +404,7 @@
void dumpPathInfo() const
Definition SplitCFG.cpp:936
void generate_paths()
Generates the paths between wait statements.
Definition SplitCFG.cpp:836
clang::ASTContext & context_
The context necessary to access translation unit.
Definition SplitCFG.h:106
-
void identifyConfluenceBlocks()
Identify confluence blocks in the CFG.
+
void identifyConfluenceBlocks()
Identify confluence blocks in the CFG.
bool getUnvisitedSuccessor(const SplitCFGBlock *curr_block, SplitCFGBlock::const_succ_iterator &I, llvm::SmallPtrSetImpl< const SplitCFGBlock * > &visited, const SplitCFGBlock *&block)
Definition SplitCFG.cpp:472
std::set< SplitCFGBlock * > identifySkipBlocks()
std::pair< const SplitCFGBlock *, SupplementaryInfo > SplitCFGPathPair
Definition SplitCFG.h:94
diff --git a/classsystemc__clang_1_1SplitCFG.html b/classsystemc__clang_1_1SplitCFG.html index fa0d27d2..92f59948 100644 --- a/classsystemc__clang_1_1SplitCFG.html +++ b/classsystemc__clang_1_1SplitCFG.html @@ -1241,7 +1241,7 @@

Definition at line 1218 of file SplitCFG.cpp.

+

Definition at line 1220 of file SplitCFG.cpp.

diff --git a/doxygen_crawl.html b/doxygen_crawl.html index d38d04b3..03b11ba5 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -20,11 +20,11 @@ - - + + @@ -155,11 +155,11 @@ - - + +