[llvm] 19d286b - [VPlan] Assert that inst isnt' a debug or pseudo inst (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 3 13:31:58 PDT 2023
Author: Florian Hahn
Date: 2023-09-03T21:31:31+01:00
New Revision: 19d286bca00ac15be780fe9886aa0a6b6ebbee3d
URL: https://github.com/llvm/llvm-project/commit/19d286bca00ac15be780fe9886aa0a6b6ebbee3d
DIFF: https://github.com/llvm/llvm-project/commit/19d286bca00ac15be780fe9886aa0a6b6ebbee3d.diff
LOG: [VPlan] Assert that inst isnt' a debug or pseudo inst (NFCI).
Debug and pseudo instructions aren't modeled in VPlan. Turn a check into
an assertion. This will help removing the direct use of Inst here in the
future.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 6aa748a9ce7958..5273f0da4be590 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -371,7 +371,9 @@ void VPTransformState::setDebugLocFromInst(const Value *V) {
// When a FSDiscriminator is enabled, we don't need to add the multiply
// factors to the discriminators.
if (DIL && Inst->getFunction()->shouldEmitDebugInfoForProfiling() &&
- !Inst->isDebugOrPseudoInst() && !EnableFSDiscriminator) {
+ !EnableFSDiscriminator) {
+ assert(!Inst->isDebugOrPseudoInst() &&
+ "debug and pseudo instruction aren't part of VPlan");
// FIXME: For scalable vectors, assume vscale=1.
auto NewDIL =
DIL->cloneByMultiplyingDuplicationFactor(UF * VF.getKnownMinValue());
More information about the llvm-commits
mailing list