[LoopFuse] Add assertion for non-null DT in fusion candidate

The code paths analyzed (all constructor invocations of fusion
candidate) pass in a non-null DT.
Adding this assert as requested in D118472 before converting this to a
reference argument.
This commit is contained in:
Anna Thomas 2022-02-01 16:46:02 -05:00
parent bc48a26655
commit f50821cff0
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ struct FusionCandidate {
GuardBranch(L->getLoopGuardBranch()), PP(PP), AbleToPeel(canPeel(L)),
Peeled(false), DT(DT), PDT(PDT), ORE(ORE) {
assert(DT && "Expected non-null DT!");
// Walk over all blocks in the loop and check for conditions that may
// prevent fusion. For each block, walk over all instructions and collect
// the memory reads and writes If any instructions that prevent fusion are