llvm-project
61d795c7 - [SLP][NFC]Cache IsExternallyUsed by Value in cost computation

Commit
21 days ago
[SLP][NFC]Cache IsExternallyUsed by Value in cost computation Same V is commonly seen in multiple TEs (shared scalars), and the expensive part of IsExternallyUsed walks V->users() with multiple match() pattern checks plus per-user getTreeEntries lookups - all V-only-dependent. Split out the V-dependent body and memoize by Value pointer, leaving the TE-specific copyable check at the call site. DeletedNodes is read-only during the cost loop, so caching is safe. Reviewers: Pull Request: https://github.com/llvm/llvm-project/pull/194637
Author
Parents
Loading