Add -fno-merge-cond-motion option

This disables code motion during V3MergeCond, for debugging.
This commit is contained in:
Geza Lore
2022-06-13 14:16:11 +01:00
parent d721f70690
commit 0c2c097377
5 changed files with 44 additions and 3 deletions
+4 -2
View File
@@ -477,10 +477,12 @@ private:
AstNode* currp = m_workQueuep->front();
m_workQueuep->pop();
// Analyse sub-tree list for code motion
// Analyse sub-tree list for code motion and conditional merging
CodeMotionAnalysisVisitor::analyze(currp, stmtProperties);
// Perform the code motion within the whole sub-tree list
currp = CodeMotionOptimizeVisitor::optimize(currp, stmtProperties);
if (v3Global.opt.fMergeCondMotion()) {
currp = CodeMotionOptimizeVisitor::optimize(currp, stmtProperties);
}
// Merge conditionals in the whole sub-tree list (this might create new work items)
iterateAndNextNull(currp);