This patch changes the order of pattern matching by first testing
a compare instruction's predicate, before doing the pattern
match for the whole expression tree. This has a positive impact
on compilation cost.
Patch by Paul Walker.
Paths
| Differential D60504
NFC: Improve pattern matching in computeKnownBitsFromAssume. ClosedPublic Authored by sdesmalen on Apr 10 2019, 4:46 AM.
Details Summary This patch changes the order of pattern matching by first testing Patch by Paul Walker.
Diff Detail
Event TimelineComment Actions Seems like a good micro-optimization while actually improving readability slightly. Do you have any performance numbers for this change? It would be good to note those here and in the commit message.
Comment Actions We found a case where repeated calls into computeKnownBits(FromAssume) skyrocketed our build-times after we added a call to llvm.assume after vectorized loops to describe the range of a newly introduced induction variable, causing some builds to time-out.
Comment Actions LGTM
This revision is now accepted and ready to land.Apr 10 2019, 8:55 AM Comment Actions Thanks @spatel. I'll also create a follow-up patch to use a switch statement as you suggested! Closed by commit rL358097: Improve compile-time performance in computeKnownBitsFromAssume. (authored by s.desmalen). · Explain WhyApr 10 2019, 9:23 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 194534 llvm/trunk/lib/Analysis/ValueTracking.cpp
|