A piece of code in isLoopBackedgeGuardedByCond basically duplicates
the dominators traversal from isBlockEntryGuardedByCond called from
isKnownPredicateAt, but it's less powerful because it does not give context
to isImpliedCond. This patch reuses the isKnownPredicateAt function there,
reducing the amount of code duplication and making it more powerful.
Details
Details
- Reviewers
lebedev.ri nikic skatkov - Commits
- rGf690986f314f: Return "[SCEV] Use isBasicBlockEntryGuardedByCond in…
rG3d4c0460ec60: [SCEV] Use isBasicBlockEntryGuardedByCond in isLoopBackedgeGuardedByCond
rG3b6481eae259: Revert "[SCEV] Use isKnownPredicateAt in isLoopBackedgeGuardedByCond"
rG14f2ad0e3cc5: [SCEV] Use isKnownPredicateAt in isLoopBackedgeGuardedByCond
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks like this change has a large negative compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=2254e014a9019bf17c3f5cb27c1dc40ca0f2ffce&to=14f2ad0e3cc54d5eb254b545a469e8ffdb62b119&stat=instructions 2% on average, 6% on mafft.
Comment Actions
Maybe it's because isKnownPredicateAt makes an extra call to isKnownPredicate which we don't really need. Let's try more lightweight version with isBasicBlockEntryGuardedByCond. This should not introduce extra overhead.
Comment Actions
Previous version was better, but still not good enough. Tried another version that removes two instances of isKnownViaNonRecuriveReasoning from the path.