[llvm] 1c4341d - [SandboxVec][DAG] Fix interval check without Node
Vasileios Porpodas via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 11:56:12 PST 2025
Author: Vasileios Porpodas
Date: 2025-01-26T11:54:09-08:00
New Revision: 1c4341d176492da5f276937b84a3d0c959e4cf5b
URL: https://github.com/llvm/llvm-project/commit/1c4341d176492da5f276937b84a3d0c959e4cf5b
DIFF: https://github.com/llvm/llvm-project/commit/1c4341d176492da5f276937b84a3d0c959e4cf5b.diff
LOG: [SandboxVec][DAG] Fix interval check without Node
This patch moves the check of whether a node exists before the check of
whether it is contained in the interval.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
index 390a5e9688cc78..7aa8794d26b20a 100644
--- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
@@ -267,11 +267,11 @@ void DependencyGraph::setDefUseUnscheduledSuccs(
auto *OpI = dyn_cast<Instruction>(Op);
if (OpI == nullptr)
continue;
- if (!TopInterval.contains(OpI))
- continue;
auto *OpN = getNode(OpI);
if (OpN == nullptr)
continue;
+ if (!TopInterval.contains(OpI))
+ continue;
++OpN->UnscheduledSuccs;
}
}
More information about the llvm-commits
mailing list