Merge pull request #16677 from MathiasVP/phi-input-nodes

C++: Extend barrier guards to handle phi inputs
This commit is contained in:
Mathias Vorreiter Pedersen
2024-06-06 19:21:30 +01:00
committed by GitHub
15 changed files with 361 additions and 103 deletions

View File

@@ -209,6 +209,7 @@ class LoopWithAlloca extends Stmt {
DataFlow::localFlow(result, DataFlow::exprNode(va)) and
// Phi nodes will be preceded by nodes that represent actual definitions
not result instanceof DataFlow::SsaPhiNode and
not result instanceof DataFlow::SsaPhiInputNode and
// A source is outside the loop if it's not inside the loop
not exists(Expr e | e = getExpr(result) | this = getAnEnclosingLoopOfExpr(e))
)