BasicAA (via MemoryDependenceResults, via GVN) may make many calls to
computeKnownBits. On my testcase (not able to share, sorry), this cache
reduces the time spent in computeKnownBits from 2s to 270ms, a 7.5x
speedup.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
49 | If you want to reformat this file can you do it first as a separate NFC patch please? |
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
52 | isGuaranteedToTransferExecutionToSuccessor, wow, TIL. Thanks. But, very sad: With the change to look at the real CtxI rather than its BB, this no longer provides a significant speedup. This all seems so silly, because in 99.9% of cases the BB terminator really *is* sufficient. Any thoughts? Or do you think I should give up on this? |
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
49 | I didn't really *want* to reformat the file, but arc was doing it for me because I touched these lines... :-/ Anyway, I pushed 8cc3bfd13f3135985e5b15ee65f2fc43239fb9fe. |
BasicAA (via MemoryDependenceResults, via GVN) may make many calls to
computeKnownBits. On my testcase (not able to share, sorry), this cache
reduces the time spent in computeKnownBits from 2s to 270ms, a 7.5x
speedup.
MDA has a known problem with overly large recursion cutoffs. I'd be interested to know whether passing -memdep-block-number-limit=100 would improve compile-time for your case.
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
52 | I don't have any great ideas on how to do more effective caching without affecting result quality. I guess we could decouple the context-independent from the context-dependent parts somehow, but given that they are currently interleaved, this doesn't sound easy. |
MDA has a known problem with overly large recursion cutoffs. I'd be interested to know whether passing -memdep-block-number-limit=100 would improve compile-time for your case.
Turns out that tweaking the memdep limits did help in my case.
So I guess I'm happy dropping this patch. Though I *do* feel like there's still something here.
Incorrect include paths