[PATCH] D94996: [GVN] do not repeat PRE on failure to split critical edge
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 06:56:46 PST 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2695
std::pair<Instruction *, unsigned> Edge = toSplit.pop_back_val();
- SplitCriticalEdge(Edge.first, Edge.second,
- CriticalEdgeSplittingOptions(DT, LI, MSSAU));
+ Changed |= !!SplitCriticalEdge(Edge.first, Edge.second,
+ CriticalEdgeSplittingOptions(DT, LI, MSSAU));
----------------
do we need `!!` here?
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2699
+ if (Changed) {
+ if (MD)
+ MD->invalidateCachedPredecessors();
----------------
This code seems redundant, right, because it is already done by `splitCriticalEdges`?
================
Comment at: llvm/test/Transforms/GVN/critical-edge-split-failure.ll:13
+
+define dso_local i32 @arch_static_branch() {
+entry:
----------------
is this function needed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94996/new/
https://reviews.llvm.org/D94996
More information about the llvm-commits
mailing list