[PATCH] D139872: [llvm][CallBrPrepare] split critical edges
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 15:02:33 PST 2022
aeubanks added inline comments.
================
Comment at: llvm/lib/CodeGen/CallBrPrepare.cpp:114
+ assert(Synth && "Failed to split a known critical edge from callbr");
+ if (Synth)
+ Changed = true;
----------------
nickdesaulniers wrote:
> aeubanks wrote:
> > unnecessary if
> `SplitKnownCriticalEdge` is fallible. If we don't end up splitting the critical edge, then we shouldn't mark denote that the pass has made changes, right?
there's an assert right above that `Synth != nullptr`, it doesn't make sense to assert on something then check if it's true
looking at `SplitKnownCriticalEdge`, it only returns `nullptr` for the options we're passing it when `DestBB->isEHPad()`, can that happen?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139872/new/
https://reviews.llvm.org/D139872
More information about the llvm-commits
mailing list