[PATCH] D147118: [ValueTracking] Use dominate tree to get dominate predecessor condtion
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 20:50:31 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Analysis/DomConditionAnalysis.cpp:10
+#include "llvm/Analysis/DomConditionAnalysis.h"
+#include "llvm/ADT/BreadthFirstIterator.h"
+#include "llvm/IR/PatternMatch.h"
----------------
Is the BreadFirstIterator used?
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:7781
+ const DomConditionInfo *DCI) {
+ std::optional<bool> IsImplied = std::nullopt;
auto PredCond = getDomPredecessorCondition(ContextI);
----------------
You don't need to explicitly pass std::nulloptr. It will default construct that way.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:7787
+
+ if (DCI && IsImplied == std::nullopt && ContextI && ContextI->getParent()) {
+ const BasicBlock *BB = ContextI->getParent();
----------------
`!IsImplied.has_value()`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147118/new/
https://reviews.llvm.org/D147118
More information about the llvm-commits
mailing list