Skip to content

Commit f50821c

Browse files
committed
[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.
1 parent bc48a26 commit f50821c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Transforms/Scalar/LoopFuse.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ struct FusionCandidate {
192192
GuardBranch(L->getLoopGuardBranch()), PP(PP), AbleToPeel(canPeel(L)),
193193
Peeled(false), DT(DT), PDT(PDT), ORE(ORE) {
194194

195+
assert(DT && "Expected non-null DT!");
195196
// Walk over all blocks in the loop and check for conditions that may
196197
// prevent fusion. For each block, walk over all instructions and collect
197198
// the memory reads and writes If any instructions that prevent fusion are

0 commit comments

Comments
 (0)