[llvm] a8e7d11 - [ValueTracking] Simplify getKnowledgeValidInContext() call (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 09:18:07 PDT 2021
Author: Nikita Popov
Date: 2021-10-14T18:17:54+02:00
New Revision: a8e7d11acaa3a066ca31b909ed8644cbbf7ccdd8
URL: https://github.com/llvm/llvm-project/commit/a8e7d11acaa3a066ca31b909ed8644cbbf7ccdd8
DIFF: https://github.com/llvm/llvm-project/commit/a8e7d11acaa3a066ca31b909ed8644cbbf7ccdd8.diff
LOG: [ValueTracking] Simplify getKnowledgeValidInContext() call (NFC)
This accepts an ArrayRef, there's no need to create a SmallVector.
Added:
Modified:
llvm/lib/Analysis/ValueTracking.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index b463ef71302eb..bf1989c58c207 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -5260,8 +5260,7 @@ static bool isGuaranteedNotToBeUndefOrPoison(const Value *V,
Dominator = Dominator->getIDom();
}
- SmallVector<Attribute::AttrKind, 2> AttrKinds{Attribute::NoUndef};
- if (getKnowledgeValidInContext(V, AttrKinds, CtxI, DT, AC))
+ if (getKnowledgeValidInContext(V, {Attribute::NoUndef}, CtxI, DT, AC))
return true;
return false;
More information about the llvm-commits
mailing list