HomePhabricator

[memcpyopt] Teach memcpyopt to optimize across basic blocks

Description

[memcpyopt] Teach memcpyopt to optimize across basic blocks

This teaches memcpyopt to make a non-local memdep query when a local query
indicates that the dependency is non-local. This notably allows it to
eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.

This is r319482 and r319483, along with fixes for PR35519: fix the
optimization that merges stores into memsets to preserve cached memdep
info, and fix memdep's non-local caching strategy to not assume that larger
queries are always more conservative than smaller ones.

Fixes PR28958 and PR35519.

Differential Revision: https://reviews.llvm.org/D40802

Details

Committed
djgDec 19 2017, 5:36 PM
Differential Revision
D40802: [MemDep] Don't use cached results from a previous larger query
Parents
rL321137: [X86] Improve coverage of fma negations.
Branches
Unknown
Tags
Unknown